TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a document in LaTeX using TeXShop on OS X Mavericks. My .tex file looks like this:

\begin{center}by #1\end{center}}


% To get slash frac to scale to font size.

% Give figures number after section, not cumulative number




(I just added an example to what I originally did for others to see)

I was just made aware of an annoying error. When I label an equation and refer to it (using \label and \ref), the reference in the .pdf text is the number of the section or subsection, not that of the equation in question.

It is starting to get really annoying and I have never had this problem before. I have also tried to delete all .aux files etc. but it didn't help.

Does anyone have any idea on how to fix this or know what the problem is?

share|improve this question

closed as off-topic by Christoph, Torbjørn T., yo', Werner, Speravir Mar 2 '14 at 0:24

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Is the problem remain if you comment both \counterwithin? – Sigur Oct 31 '13 at 18:46
your example code doesn't seem to have a example of the problem, it has no equation or ref commands, please edit the code to show the problem. – David Carlisle Oct 31 '13 at 19:30
Are you using \begin{equation}\label{Alabel}<equation>\end{equation} or perhaps the \label is after \end{equation}? – egreg Oct 31 '13 at 21:04
I imagine you've added the label in the wrong place- without a complete MWE to demonstrate the problem, it'll be hard to tell, though :) – cmhughes Nov 1 '13 at 3:27
This question appears to be off-topic because it is too localized, the \label was behind the \end{equation}. – Christoph Mar 1 '14 at 23:56