0

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

David Carlisle
  • 757,742
user26832
  • 497

1 Answers1

5

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.

Sigur
  • 37,330
  • 1
    Please, add an example. – egreg Feb 25 '15 at 00:16
  • @egreg, I was editing. Done! – Sigur Feb 25 '15 at 00:20
  • @egreg I'm sorry, but instead of the ordered theorem I got a double interrogation sign ?? – user26832 Feb 25 '15 at 00: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 00:36
  • I couldn't do the same thing with the definitions, I made something wrong? – user26832 Feb 25 '15 at 00:42
  • @user26832, I guess that you are inserting labels starting with thm. But the label name is your choice. I just suggested thm.foo to help you to remember that it belongs to a theorem. For example, you can use def.bla. – Sigur Feb 25 '15 at 00:44
  • No, I wrote the names theorem1 and theorem2 to theorems and definition1 to my definition. – user26832 Feb 25 '15 at 00:47
  • @user26832, the process is the same. Just define the definition, lemma, proposition, etc... as you did for theorems. Give a label to it an cite using ref{}. Compile twice. – Sigur Feb 25 '15 at 00:51