Suppose I have some theorem in the paper
Section 1
Theorem 1.1. Let ...
And then later in the paper I want to recall the theorem by reprinting it
Section 4
We recall Theorem 1.1:
Theorem 1.1. Let ...
What's the proper way to do this?
Suppose I have some theorem in the paper
Section 1
Theorem 1.1. Let ...
And then later in the paper I want to recall the theorem by reprinting it
Section 4
We recall Theorem 1.1:
Theorem 1.1. Let ...
What's the proper way to do this?
The thm-restate
package which is part of thmtools
offers a restatable
environment. In the following example, I also use hyperref
and cleveref
(its \cref
macro automatically adds the correct theorem type). See section 1.4 of the thmtools
manual for details.
\documentclass{article}
\usepackage{thmtools}
\usepackage{thm-restate}
\usepackage{hyperref}
\usepackage{cleveref}
\declaretheorem[name=Theorem,numberwithin=section]{thm}
\begin{document}
\section{First}
\begin{restatable}[Goldbach's conjecture]{thm}{goldbach}
\label{thm:goldbach}
Every even integer greater than 2 can be expressed as the sum of two primes.
\end{restatable}
\section{Second}
We recall \cref{thm:goldbach}:
\goldbach*
\end{document}
\usepackage
command as other packages. It also likes to be placed after amsthm
.
– Jessica B
Oct 14 '13 at 16:49
LaTeX Warning: \Cref reference format for label type 'thm' undefined on input l ine 23. ! Undefined control sequence. \HyRef@StarSetRef ...Hy@safe@activestrue \edef \x {#1}\@onelevel@sanitize \x... l.25 \goldbach*
. How can I circumnavigate this issue?
– jdc
Aug 19 '14 at 0:21
If you need it only once or twice or so, you can locally in the repeating: 1) tweak theorem label printing, 2) add -1
to the theorem
counter since it gets increased by the repeated theorem. The code:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\section{First}
\begin{theorem}\label{mythm}
Let $x$ ...
\end{theorem}
\section{Second}
\begin{theorem}
This should be two.one
\end{theorem}
Let us recall the theorem from the first section.
\begingroup
\def\thetheorem{\ref{mythm}}
\begin{theorem}
Let $x$ ...
\end{theorem}
\addtocounter{theorem}{-1}
\endgroup
\begin{theorem}
This should be two.two
\end{theorem}
\end{document}
\ref
erence might actually be better. As a reader, if I saw Theorem 1.1 in two places of a book, I'd think it's a mistake, and after seeing that this is actually the same theorem, I might feel "cheated" by the author... – mbork Apr 9 '12 at 15:29