3

I have written a two-row equation in this way:

\begin{eqnarray}\label{cov}
a \\ & =& b.
\end{eqnarray}

with as a result

enter image description here

If I write (\ref{cov}) I get "(10)". Do you know how to create a cross-reference to equation (11) instead? Thanks.

Qrrbrbirlbel
  • 119,821
MementoMori
  • 317
  • 3
  • 10
  • 3
    put the \label on the 2nd row. it is a bit weird to number half an equation, consider adding \nonumber to the first row, so you only get (10) – David Carlisle Feb 22 '23 at 15:45

1 Answers1

5

You need to place the \label instruction after rather than before \\ if you want to be able to cross-reference the second equation.

enter image description here

On a different topic: Don't use the eqnarray environment. No ifs, ands, or buts. No way, no how. Do please load the amsmath package and employ that package's align environment instead.

\documentclass{article} 
\begin{document} 
\setcounter{equation}{9} % just for this example
\begin{eqnarray}
a \\ &=& b. \label{cov}
\end{eqnarray}
A cross-reference to equation (\ref{cov}).
\end{document}
Mico
  • 506,678