1

There are times, where I would like to repeat a theorem, for instance, if the proof goes into the appendix. In this case, I would like the two theorems to have the same number, without influencing the counter. Is there any simple way to achieve this?

What I am basically after is this:

\documentclass[a4paper,11pt]{article}
\newtheorem{thm}{Theorem}
\begin{document}
\section{Main}
\begin{thm}
This is theorem 1
\end{thm}
\section{Appendix}
\subsection{Proof of theorem 1}
To prove this theorem we need another theorem:
\begin{theorem}
This is another theorem
\end{theorem}
\setcounter{thm}{0}
\begin{theorem}
This is theorem 1
\begin{proof}
The proof of this theorem follows theorem 2...
\end{proof}
\end{theorem}
\setcounter{thm}{2}
\end{document}

But without the hassle of manually having to keep track of how far the counter has come.

3
  • You can create a nonnumbered theorem enviroment and then you use it with optional argument and \ref to the original theorem number.
    – Sigur
    Commented Jan 30, 2018 at 14:52
  • What do you mean by an optional argument? if it is begin{thm}[Theorem \ref{thm:theorem1}], then will only put the correct number in parenthesis. Commented Jan 30, 2018 at 14:58
  • not a duplicate, but perhaps helpful: How do you reprint a theorem, proposition, etc. in its entirety? Commented Jan 30, 2018 at 15:31

1 Answer 1

1

How's this? I define an environment {repeatthm} which takes a mandatory argument which should be the label of the theorem being repeated. The repeat theorem labels itself Theorem \ref{#1}. (So if the reference is undefined it will appear as Theorem ??.)

\documentclass{article}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}

\makeatletter
\newtheorem{repeatthm@}{Theorem}
\newenvironment{repeatthm}[1]{%
    \def\therepeatthm@{\ref{#1}}
    \repeatthm@
}
{\endrepeatthm@}
\makeatother

\begin{document}
\section{Main}
\begin{thm}
This is thm 1
\end{thm}

\begin{thm}
\label{a-thm}
This is theorem 2
\end{thm}
\section{Appendix}
\subsection{Proof of thm 1}
To prove this theorem we need another theorem:
\begin{thm}
This is another theorem.
\end{thm}

\begin{repeatthm}{a-thm}
This is theorem 2 again.
\end{repeatthm}
\begin{proof}
The proof of this theorem follows thm 2...
\end{proof}

\begin{repeatthm}{unknown-thm}
This is a repeated theorem with an incorrect label.
\end{repeatthm}
\end{document} 
2
  • Even better than the linked solution! Commented Jan 30, 2018 at 15:33
  • Note that the link @barbarabeeton gave has this answer: tex.stackexchange.com/a/348869/23866 which does what I did but with handling for multiple different theorem environments. Commented Jan 30, 2018 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .