0

I will have a Theorem, Lemma or Corollary and it will be numbered, say for example, 2.2.3 ... Unfortunately, every reference back to ANY Theorem, Lemma or Corollary simply state 2.2 ... It seems to be truncating the last number!

Here is code that represents what I've done so far...

\documentclass[12pt]{amsart}
\newtheorem{theorem}{Theorem}[section]

\begin{document}

\chapter
\section

\begin{theorem} This is the theorem.
\begin{proof} This is the proof.
\end{proof}
\end{theorem}
\label{thm-01}

Now we reference Theorem \ref{thm-01}

\end{document}

The theorem labels itself as Theorem 1.1.1 but when I reference it later in the document it reads "No we reference Theorem 1.1"

Any suggestions on how to fix this?

  • 1
    Presumably the theorem counter is being incorrectly incremented, but if you don't show the code, it's hard to say what is wrong with it. – David Carlisle Jun 9 '14 at 17:48
  • @Daivd Carlisle I'm not really sure what part of the code one would want to see... I have \begin{corollary} This is the corollary. \begin{proof} This follows directly from Theorem \ref{thm-01}. \end{proof} \end{corollary} \label{cor-01} And that shows how I reference and label the theorems, etc... – Bark Jr. Jun 9 '14 at 17:51
  • You should make a small (10 line) complete document that shows the problem, starting from a copy of your original and deleting everything that you can while still demonstrating the problem. Clearly the behaviour that you describe is not the default so you have code that is changing the behaviour but its hard to debug unseen. see meta.tex.stackexchange.com/a/3225/1090 – David Carlisle Jun 9 '14 at 18:01
  • I put a better version into the main question. Let me know if that clears up my question or if you need more info. – Bark Jr. Jun 9 '14 at 18:18
4
\end{proof} \end{corollary} \label{cor-01} And

your \label is outside the corollary, so it is labelling the containing section. Put it inside the thing it is labelling.

  • So before \end{corollary} or before \end{proof}? – Bark Jr. Jun 9 '14 at 18:19
  • Actually, I can just test both out myself! – Bark Jr. Jun 9 '14 at 18:19
  • @Bar It depends \label records the last referencable counter in the current scope, so the most natural place to put it is just after the \begin{corollary] where the counter that you are referencing is incremented. – David Carlisle Jun 9 '14 at 18:26

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.