# Geometry Package Not Working with Standalone Class

Here is my TeX file (test.tex) I am trying to process (initially the TeX was successfully being processed on an Ubuntu 10.04 OS, but the server I am on was upgraded to Ubuntu 12.04 and now things don't work as before):

\documentclass{standalone}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pst-plot}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{esint}
\usepackage{eucal}
\usepackage{polynom}
\usepackage{xlop}
\usepackage{varwidth}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{cancel}
\usepackage{textcomp}
\usepackage{wasysym}
\usepackage[paperheight=\maxdimen]{geometry}
\DeclareGraphicsExtensions{.eps}
\input{longdiv}
\pagestyle{empty}
\thispagestyle{empty}

\begin{document}
$text here$
\end{document}


All of the packages seem to be included just fine, but in my log file I see the line ! Huge page cannot be shipped out., and my .eps file is not created.

This is the command I am running to convert my TeX:

latex --shell-escape --interaction=nonstopmode test.tex


If I comment out the \usepackage[paperheight=\maxdimen]{geometry} line, the TeX is successfully rendered. I have tried other options for the geometry package, but nothing has worked so far. Any suggestions for options to pass in, or perhaps a different package?

• I guess that \maxdimen is not defined within standalone class. Replace the command by some value, for example, 297mm. – Sigur Jan 29 '15 at 23:22
• Why do you want to have geometry with standalone? The idea of standalone is to change the size dynamically. – percusse Jan 29 '15 at 23:31
• @Sigur: i was under the impression that \maxdimen was defined in geometry... either way, a static value still gave me an error. @percusse: based on your comment, it seems like I don't need geometry? I had included the \maxdimen option in the first place because my LaTeX code was being cutoff at a certain height (most likely from geometry shrinking the image to 8.5x11" size?), so if it's not needed, then all the better.. – wikenator Jan 29 '15 at 23:33
• You can use geometry with standalone and I have done this, but it is not the normal way to do it and you need to switch off some of standalone's default functionality if you do so. However, looking at your preamble, I wonder if you are really misusing the class... – cfr Jan 30 '15 at 3:05
• @Sigur \maxdimen is defined by the LaTeX kernel. – Heiko Oberdiek Nov 23 '16 at 22:44

\usepackage[pass,paperheight=\maxdimen]{geometry}

"With the pass option, geometry won't change the class parameters for pagination, as it would do without it." (As noted in this question here, the selected answer gave me the answer I needed.) After using the pass option, no more complaints about huge pages not being shipped out.