I have a large document, and to minimize compilation time, I would like to recompile only the last section of it as it is edited. My trouble with standard solutions is that they destroy the numbering: I would like theorems, definitions, etc. in the final section to be numbered as they would in the entire document, rather than starting at 1.
Is there a standard solution for this? Ideally, I'm hoping for an environment that works like a comment except that it adjusts counters. For example, it would have the following behavior:
\begin{specialenvironment}
\begin{theorem} This theorem will not show up at all. \end{theorem}
\end{specialenvironment}
\begin{theorem} This will show up as Theorem 2. \end{theorem}
Thanks in advance!