1

Given a file master.tex:

\documentclass{article}

\usepackage{standalone}

\begin{document}
\input{sub}
\end{document}

and a file sub.tex:

\documentclass{standalone}

\begin{document}
\[
        0
\]
\end{document}

the command pdflatex master.tex runs as expected, but the command pdflatex sub.tex gives the error

Bad math environment delimiter.

Can anyone explain what is going on and/or how to solve this?

jmc
  • 1,660
  • I agree about the possible duplicate. This question can be closed. Or should I delete it myself? – jmc Jun 12 '14 at 11:23

1 Answers1

1

Standalone is not meant to be used with the environments displaymath or equation as it would not know, where to put the labelling number. You should do it the following way.

% arara: pdflatex 

\documentclass{standalone}

\begin{document}
$\displaystyle
        0
$
\end{document}

If you want to mimic a real document equation, you should use the prewiev option of the standalone class.

LaRiFaRi
  • 43,807