In my document I'm embedding figures using the following code:
\begin{figure}[!t]
\centering
\def\svgwidth{1.2\columnwidth}
\resizebox{\columnwidth}{!}{
\endlinechar=255\relax
\begin{picture}(1,0.63636365)
\put(0,0){\includegraphics[width=\unitlength]{figure.eps}}
\put(0.50454546,0.58636365){\color[rgb]{0,0,0}\makebox(0,0)[b]{\smash{some text $ax^2+bx+c=0$.}}}
\end{picture}
}
\caption{Caption.}
\label{fig:figure}
\end{figure}
Where the image (figure.eps
) contains no text and all annotations are added on top of the image using \put
commands.
This method works very well (annotations can include any LaTeX macros, which is extremely useful) as long as I'm sticking to TeX. Now, however, I'd like to take the resulting figures (preferably in a vector format) and put them in some other tool.
Questions:
- Is there any way of outputting these
float
s into PDF files with no margins, captions and with page dimensions equal to the specifiedfloat
size? I imagine I'd have to somehow wrap eachfloat
in a.tex
file with a custom preamble. - Is it possible to automate this process so that if I want to dump all my N figures to PDFs I don't have to repeat the step (1) N times.
standalone
.preview
package directly.