For me the "standalone" documents is useful to produce a document with a size that matches exactly the document. However, here is an example where the final size is to small:
Here is the same document, with an aditional 'A':
Do you know why the size of the first arrow is not the good one, and how to correct that?
Thank you!
MWE:
\documentclass{standalone}
\begin{document}$\leftarrow$\end{document}
Best Answer
As the TeX Book says (p. 63)
Here we have such a situation: the
\leftarrow
is larger than the box, as the following snippet showsHowever,
standalone
doesn't know that, so we must force it to consider a somewhat larger box. One easy way is to insert some vertical phantom, like\vphantom{A}
or even a simple\strut
. Alternatively, thestandalone
class accepts an optional argumentborder
with syntaxSo in this case one might use
or
if you want the border only above.