4

I have a theorem with a long proof. The proof is so long that it's formed from several separate LaTeX files, each of which I need to be able to work on independently. The way I usually do this is with the docmute package, which allows each subfile to have its own headers so it can be worked on as a stand-alone document, but then ignores the headers and the \begin{document} and \end{document} commands when \inputing the subfile into the main document.

However, this doesn't seem to work inside a proof environment. Here's the MWE. First, the main file:

\documentclass{article}
\usepackage{docmute}
\usepackage{amsthm}
\begin{document}
Here is my important proof.
\begin{proof}
\input{proof}
\end{proof}
\end{document} 

Now the subfile called proof.tex:

\documentclass{article}
\begin{document}
Hello, world!
\end{document} 

The error message:

LaTeX Error: \begin{proof} on input line 8 ended by \end{document}

Suggestions welcome!

Thorsten
  • 12,872
Jamie Vicary
  • 11,098

1 Answers1

5

Your MWE works for me with the current version 1.2 of docmute (it fails with the older version 1.1). Maybe updating the package is all you need.

Tomek
  • 1,588