# Using \usepackage[active,tightpage]{preview} does not generate any page

What is wrong with this code?

\documentclass{article}
\usepackage[active,tightpage]{preview}
\begin{document}
$$1 + 1 = 2$$
\end{document}


I get this error.

\$ pdflatex bar.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
restricted \write18 enabled.
entering extended mode
(./bar.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/preview/preview.sty
(/usr/share/texmf/tex/latex/preview/prtightpage.def)) (./bar.aux)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(./bar.aux) )
No pages of output.
Transcript written on bar.log.


I want the behavior of \documentclass[preview]{standalone}. Both text and math should be rendered, however the page size should be cropped so that is large enough to fit all content, but no larger than that.

You probably want to extract math formula(s), so

\documentclass{article}
%\usepackage[active,tightpage]{preview}
\usepackage[active,tightpage,textmath]{preview}

\begin{document}
$$1 + 1 = 2$$
\end{document}


• I want the behavior of \documentclass[preview]{standalone}. Both text and math should be rendered, however the page size should be cropped so that is large enough to fit all content, but no larger than that. Nov 23 '13 at 9:57
• @LoneLearner So why not using standalone? Nov 23 '13 at 11:04
• @LoneLearner Well,this is completely different question. Nov 23 '13 at 14:51
• @greg I see the standalone class missing many features. For example, \setlength{\parskip}{\baselineskip} does not produce the gap I need between paragraphs while using standalone. Nov 24 '13 at 11:33