rossprogram / tex.rossprogram.org

A real-time collaborative TeX editor
17 stars 2 forks source link

Handle packages that create new files inside LaTeX #1

Open tobiasBora opened 3 years ago

tobiasBora commented 3 years ago

Hello,

First, thanks a lot for this wonderful tool! It works great, except on packages that create new auxiliairies files (my package proof-at-the-end creates for example a new file in which it puts some text to move in appendix). Any idea if its possible to also deal with kind of packages (I think the comment package also uses that)?

Thanks!

MWE:

\documentclass[]{article}

\usepackage{proof-at-the-end}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

% Nice wrapper for simplicity:
\NewDocumentEnvironment{theoremE}{O{}O{}+b}{%
  \begin{theoremEnd}[normal,#2]{theorem}[#1]%
    #3%
  \end{theoremEnd}
  %
}{}% Do not forget the second parameter or you might get Missing \begin{document} error

\begin{document}

Here is my theorem:

\begin{theoremE}[][end]
  I am a theorem. But go in appendix to see my proof.
\end{theoremE}
\begin{proofEnd}
  Here is the proof.
\end{proofEnd}

\newpage
\appendix
\section{Appendix}
Proofs are given in this section.
\printProofs

\end{document}