6

I'm trying to create a theorem environment that I can use to repeat a theorem that has been previously stated in a book but number it the same as the 1st instance. I found some sort of solution:

\documentclass{article}

\usepackage{amsthm} 

\newtheorem{theorem}{Theorem}
\newcounter{thmC}
\newtheorem{rethm}[thmC]{Theorem}

\newenvironment{retheorem}[1]%
{\setcounter{thmC}{#1}%
\addtocounter{thmC}{-1}%
\begin{rethm}}%
{\end{rethm}\ignorespacesafterend}

\begin{document}

\begin{theorem}\label{theorem:Hi}
Hi this is my theorem.
\end{theorem}

\begin{theorem}\label{theorem:another}
Another theorem.
\end{theorem}

\begin{theorem}\label{theorem:third}
third theorem
\end{theorem}

\begin{retheorem}{\ref{theorem:third}}
third theorem
\end{retheorem}

\begin{retheorem}{\ref{theorem:another}}
Another theorem.
\end{retheorem}

\begin{retheorem}{\ref{theorem:Hi}}
Hi this is my theorem.
\end{retheorem}

\end{document}

It nearly works but there is a spacing issue.

output picture

My further concern is will this approach work for theorems labeled with the section

\numberwithin{theoremC}{section}
\newtheorem{theorem}[theoremC]{Theorem}
7

This functionality is already provided by the restatable environment from the thmtools package; the package also offers a continues key and it handles, in both situations, the case of the theorem counter being subordinated to another one:

\documentclass{article}
\usepackage{amsthm} 
\usepackage{thmtools,thm-restate}

\declaretheorem[numberwithin=section]{theorem}

\begin{document}

\section{Test section one}
\begin{theorem}[label=thm:key]
This is a theorem that will be continued later.
\end{theorem}
\begin{restatable}{theorem}{Hi}
This is my first restatable theorem.
\end{restatable}
\begin{restatable}{theorem}{another}
This is my second restatable theorem.
\end{restatable}
\section{Test section two}
\begin{restatable}{theorem}{third}
This is my third restatable theorem.
\end{restatable}
\section{Test section three}
\third*
\another*
\Hi*
\begin{theorem}[continues=thm:key]
And here I expand my theorem.
\end{theorem}

\end{document}

enter image description here

However, there's still a little difference in vertical spacing between the restatable and the standard theorems.

  • Okay I see how this works. There are certainly some advantages of not restating the theorem. But what if I have a theorem I want to amend. Think invertible matrix theorem, every time I get a new concept I can add a few more points to it. – N8tron May 22 '14 at 2:37
  • @NateIverson the fact that you want to do that is not clear in your question, which seems to address just the restating case. Please add it there so it's clear for everyone what exactly you are trying to do, and then I can delete this answer. – Gonzalo Medina May 22 '14 at 2:40
  • It looks like there is a continues case also so the restate option is viable in every case I can come up with page 8 of this document ctan.mirrorcatalogs.com/macros/latex/exptl/thmtools/… – N8tron May 22 '14 at 2:43
  • @NateIverson Yes, now I see what you meant. I've added a little example with continues to my answer. – Gonzalo Medina May 22 '14 at 2:51

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.