# I'm having troubles with the theorem orders

My question is really simple, always when I add a new theorem or definition to my thesis I have troubles to redefine the orders of the others theorems/definitions. For example, suppose I have theorem 1.1,1.2 and 1.3. If I add a theorem between 1.1 and 1.2 the theorems 1.2 will become 1.3 and the 1.3 will become 1.4. Because of that I have to redefine every comment I made regarding do theorems 1.2 and 1.3 to 1.3 and 1.4 resp. How can I solve this problem?

Thanks

• Does this help? tex.stackexchange.com/questions/2450/… – Maarten Dhondt Feb 25 '15 at 0:16
• Hi! Have you ever read any LaTeX manual? I would recommend LaTeX for complete novices, section "Cross-referencing" (should be section 5.5). – yo' Feb 25 '15 at 0:16
• Note the \label / \ref mechanism doesn't just apply to theorems: every numbered construct can be referenced in the same way, sections list items, equations, etc. – David Carlisle Feb 25 '15 at 0:19

## 1 Answer

You can solve the problem adding a \label{thm.foo} to each theorem and then you cite it as \ref{thm.foo}.

So it does not matter the order of the theorems, they will be always right cited.

\begin{theorem}\label{thm.foo}
bla bla
\end{theorem}

Theorem~\ref{thm.foo} states that


This process is called crossed reference and you can label any numbered object (using \label{}) and cite it (with \ref{}). Note that amsmath package provides the command \eqref{} for equations, which insert the parentheses automatically.

• Please, add an example. – egreg Feb 25 '15 at 0:16
• @egreg, I was editing. Done! – Sigur Feb 25 '15 at 0:20
• @egreg I'm sorry, but instead of the ordered theorem I got a double interrogation sign ?? – user26832 Feb 25 '15 at 0:34
• @user26832, you need to compile twice in order to update the crossed reference. Also, check if there is some typo on the labels name. – Sigur Feb 25 '15 at 0:36
• I couldn't do the same thing with the definitions, I made something wrong? – user26832 Feb 25 '15 at 0:42