1

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:

  \documentclass{article}
  \pagestyle{empty}
  \usepackage[papersize=minimal]{geometry}
  \begin{document}
  \[
     Some beautiful formula
  \]
  \end{document}

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

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

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

\documentclass{standalone}
\begin{document}
\( \displaystyle E=mc^2 \)
\end{document}

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

\documentclass{standalone}
\usepackage{array}

\begin{document}
\begin{tabular}{@{}>{$\displaystyle}r<{\null$}@{}>{$\displaystyle\null}l<{$}@{}}
E &= mc^2 \\
e^{i\theta} &= \cos\theta + i\sin\theta
\end{tabular}
\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.