is there a way to generate a (single-page) PDF with pagesize that is just large enough for the text that I want to display?

Perhaps something along these lines:

     Some beautiful formula

And then produce a PDF with a pagesize that is just enough for the "beautiful formula".

  • 4
    See the standalone class. Feb 13, 2020 at 14:21
  • @UlrikeFischer That seems indeed to be the solution. I'll "play" with it. Danke!
    – pe1aqp
    Feb 13, 2020 at 14:31

1 Answer 1


For a single line and no equation number, use \displaystyle:

\( \displaystyle E=mc^2 \)

For multiple lines with no equation numbers, you can abuse a tabular.


E &= mc^2 \\
e^{i\theta} &= \cos\theta + i\sin\theta

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .