I'd like to create a pdf/ps/eps that contains only one single formula. I thought the easiest way would be to use latex. Unfortunately, I found no option to specify, that the paper-size should automatically be set to fit the contents.
I found that dvipng has a "-T tight" option, that actually does the trick, but... I want it in vector-graphics format.
Any suggestions?
Thanks.
How do you fit text to a page in LaTeX? The paper size can be set to any size you need by means of the command papersize={⟨width⟩,⟨height⟩} . Here the text area, the left margin and the top margin are set. The right and bottom margins are automatically computed to fit the page.
They were designed for handwriting (which is usually much bigger) or for typewriters. Typewriters produced 10 or 12 characters per inch: so on (say) 8.5 inch wide paper, with 1 inch margins, you had 6.5 inches of type, giving ... around 65 to 78 characters: in other words something pretty close to ideal.
Modifying a document's paper size, orientation and margins is a common requirement which can easily be achieved using the geometry package. There are two ways to set the desired values: provide them them as parameters to the \usepackage statement as in the example above, or. use the \geometry command in the preamble.
LaTeX's margins are, by default, 1.5 inches wide on 12pt documents, 1.75 inches wide on 11pt documents, and 1.875 inches wide on 10pt documents. This is the standard for book margins.
With the standalone class, you get exactly what you want.
\documentclass{standalone} \begin{document} \[ x + y = z \] \end{document}
Try pdfcrop, it crops your pdf to the minimum. You need to have Perl installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With