Incompatible with revtex-4.1

Create issue
Issue #29 resolved
Stephen Wade created an issue

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

Comments (4)

  1. Martin Scharrer 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.

  2. Martin Scharrer 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.

  3. Log in to comment