13

This question is related to the question at Recalling a theorem, which uses the thmtools and thm-restate packages and the restatable environment to define a theorem that can be re-stated later on.

Is it possible to refer to something that is defined later on? In an earlier chapter, I have some discussion that is referring to a definition that is defined properly in a later chapter, but I can't reuse the definition before it is defined...

For example, when I do the following

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

\declaretheorem[name=Theorem,numberwithin=section]{thm}

\begin{document}

\section{First}

\goldbach*

\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}

\end{document} 

I get an error -

undefined control sequence \goldbach

Is there any way to export these definitions so that they can be referred to before they are actually defined...?

9

Do it the other way round, using the restatable* environment.

\documentclass{article}
\usepackage{thmtools} 
\usepackage{thm-restate}
\usepackage{lipsum}

\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*}

\lipsum[2]

\begin{thm}
One
\end{thm}

\lipsum[3]

\begin{thm}
Two
\end{thm}

\lipsum[3]

\goldbach

\lipsum[3]


\end{document} 

enter image description here

  • Perfect, I should have thought of that! Thanks! – conorsomahony May 10 '13 at 16:40

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.