Writing
\documentclass{standalone}
\usepackage{varwidth}
\begin{document}
\begin{varwidth}{\linewidth}
{\em line 1}
{\em line 2}
\end{varwidth}
\end{document}
produces an incorrect bounding box for italics (note that the '2' is clipped):
How can one generate a correct standaline image? Simply modifying \linewidth to a fixed dimension does not work.
(As discussed here, inserting varwidth
is necessary to avoid that standalone
would merge the two lines on one line.)
{}
button on the menu. As you can seee from the edit the code was not indented when I did that.