2

I want to have an appendix with a theorem's proof. The theorem appears in the main body of the document, and I would like to have it replicated in the appendix as well for convenience.

If I simply copy the original theorem environment, it is rendered in the appendix with a new number. I would like to use the same original number through \ref. What is the cleanest way to accomplish this?

Bonus points: it would be even better to somehow manage an entire copy of the theorem without actually repeating the source code for it, but referencing the first occurrence. This way, if I decide to change details in the theorem, they would be automatically reflected in the appendix's copy. Is there a clean way to do this?

4

You have the restatable environment from thmtools + thmrestate. See details and explanations in §1.4, Repeating theorems of the documentation of thmtools. Note this package cooperates with amsthm as well as ntheorem.

The example in the documentation goes as follows: first declare your theorem environment:

\usepackage{thmtools, thm-restate}
\declaretheorem{theorem}
\begin{restatable}[Euclid]{theorem}{firsteuclid}
\label{thm:euclid}%
For every prime $p$, there is a prime $p’>p$.
In particular, the list of primes,
\begin{equation}\label{eq:1}
2,3,45,7,\dots
\end{equation}
is infinite.
\end{restatable}

The last argument of the restatable environment is the name of the command which will be used to restate the theorem:

\firsteuclid, or the starred version: \firsteuclid*, which reproduces the numbering of the original version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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