I am having difficulty making LaTeX generate correct numbers for my
equations. My problem is equivalent to the example shown at the
bottom of page 49 of "LaTeX User's Guide & Reference Manual" by
Leslie Lamport. Suppose I want to refer to equation (3) later in the text.
I understand that I should use \label{whatever} in the eqnarray environment
and refer to it by \ref{whatever}. But LaTeX does not understand which one
of the two equations I am refering to and generates ??. A similar situation
happens in an eqnarray environment when I am trying to break a long long
equation into lines and use \nonumber for all the lines except the last one,
in oreder to assign a number to the mess I generated. Then I would say
\label and \ref and latex would generate a correct equation number in front
of the equation but when I refer to it, it gives that number plus 1!
I have a feeling that I am missing something simple. Can somebody shed
some light on this matter. Thank you all.
Ali
Since you are getting the equation number incremented by 1 when you refer to
it, I think you are probably putting the \label command *after* the "\\" on
each line. This effectively attaches the label to the next line, i.e., the
next equation. Instead of this:
\begin{eqnarray}
x & = & 17y \\ \label{eq:one}
y & > & a + b + c + d + e + f + g + h + i + j + \nonumber \\
& & k + l + m + n + o + p \\ \label{eq:two}
z & = & 11y \label{eq:three}
\end{eqnarray}
Try this:
\begin{eqnarray}
x & = & 17y \label{eq:one} \\
y & > & a + b + c + d + e + f + g + h + i + j + \nonumber \\
& & k + l + m + n + o + p \label{eq:two} \\
z & = & 11y \label{eq:three}
\end{eqnarray}
I Hope this answers your question.
Sunando Sen
se...@fasecon.econ.nyu.edu