TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

Here is my important proof.

Now the subfile called proof.tex:

Hello, world!

The error message:

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

Suggestions welcome!

share|improve this question
It works in my computer. I use TeXLive 2011. – kiss my armpit Dec 13 '11 at 11:41
up vote 4 down vote accepted

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.

share|improve this answer
Bingo, thanks for the suggestion. – Jamie Vicary Dec 13 '11 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.