# Incompatible with revtex-4.1

Issue #29 resolved

I am attempting to put together a paper to submit to APS, for which I am using ReVTeX 4.1. I would like to include figures as separate files via the standalone package, and have the option to build them as pdfs with the same size as seen in the final document.

To do this I tried to use the standalone class with the class option class=revtex4-1 and within the main document use the \includestandalone[mode=buildnew] macro. This fails as pdflatex seems to get stuck in an infinite loop building a larger and larger pdf document of the standalone file.

Here's a MWE. Consider a file main.tex

\documentclass[aps,prl,10pt]{revtex4-1}
\usepackage[subpreambles=true]{standalone}

\begin{document}

\includestandalone[mode=buildnew]{sketch}

\end{document}


And a file sketch.tex

\documentclass[class=revtex4-1,aps,prl,10pt]{standalone}

\begin{document}

Test

\end{document}


And compile via the command

pdflatex --shell-escape main.tex


1. repo owner
2. repo owner

The error also occurs if you compile the sketch file on its own simply with pdflatex sketch.tex. Something in the revtex4-1 class must cause standalone to repeat the page.

3. repo owner

The reftex4-1 class changes the output routine of LaTeX and is not compatible with the default way standalone crops the pages. You can fix this by simply adding the 'preview' option to the \documentclass[..]{standalone} line in the subfiles. This way the cropping is done by the 'preview' package which is compatible with changed output routines.

4. repo owner
• changed milestone to v1.3
• changed version to v1.2