I can not get standalone to work with figures; I get the error Not in outer par mode.
(The figure is in the included file.)
I can not get standalone to work with figures; I get the error Not in outer par mode.
(The figure is in the included file.)
I now release standalone v1.0 which turns floats to non-floating environments automatically by default. Now you can use figure as normal inside standalone files. See the float option in the manual.
No, floats like figure and table environments are not supported with the standalone class or by the internally used preview package. The whole file is rendered as one box and there is not place where it could float to.
Just remove the environment and include your images or pictures as normal. Place the figure environment including the \caption in the main file and \input the standalone file there:
% inside the main file
\begin{figure}
\centering
\input{somestandalonefile}%
\caption{The caption text}\label{fig:abc}%
\end{figure}
If you want to have the caption inside the standalone for any reason load the caption or capt-of package and use \captionof{figure}{<caption text>}. You can put the whole thing in a center environment. However centering might not work properly in a standalone because of the cropping.
\documentclass{standalone}
\usepackage{capt-of}
\begin{document}
\begin{center}
% your image or picture code
\captionof{figure}{The caption text}\label{fig:abc}
\end{center}
\end{document}
figureenvironment should not be in thestandalonefile, but be part of the main document. Your code seems to great a paragraph which is then\linewidthwide. This causes the white space on the right. – Martin Scharrer Oct 31 '12 at 21:41