2

thank you for your time.

I wonder if it is possible to render one phrase only in latex and make sure the document is wrapped around the phrase (no bigger that it need to be)? I know you can set the size of a document with the package geometry but I would prefer for it to be somewhat automatic as I want to incorporate this in a script.

example being the entire document: this the entire document Thank you for you time and help

NRagot
  • 51

1 Answers1

3

Ok, the comment from samcarter allowed me to find what I needed on the internet. The standalone document class is the one. This page has everything : How to make a standalone document with one equation?.

Thank you

Even though the one in the link seems awfully similar to mine, I wont erase my question since to find the one in the link you have to know the standalone class (Unless asked otherwise of course). Good day to all.


edit: As requested, here is the result enter image description here
from

\documentclass{standalone}
\begin{document}
$
\displaystyle
\int_a^x f(t)dt = \lim_{n \rightarrow +\infty} \sum_{k=0}^n \frac{x - a}{n} f\left(k \frac{x - a}{n} + a\right)
$
\end{document}

Notice the use of $ \displaystyle ... $ instead of $$ ... $$; it is because the standalone class doesn't accept $$ by default for being in crop mode. Going into preview mode only wrap the text vertically and not horizontally which is even better for me. If that is no problem for you however, just replace the line \documentclass{standalone} by \documentclass[preview]{standalone} from which the class allow the use of $$.

BambOo
  • 8,801
  • 2
  • 20
  • 47
NRagot
  • 51