# How can I add numbers to specific equations in an eqnarray*?

I know how to use \nonumber or \notag in \begin{eqnarray} \end{eqnarray} environment.

But is there something like \addnumber or \addtag in \begin{eqnarray*} \end{eqnarray*} environment ?

For example, if I want only the second equation below be tagged, what should I do?

\begin{eqnarray*}
a &=& b\\
e &=& f\\
g &=& h\\
i &=& j
\end{eqnarray*}

-
For some reason \\ shows like \ above. – TCL Feb 6 '11 at 5:39
a tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). Then the "\\" shows as it should. (Leo did this for you.) – Hendrik Vogt Feb 6 '11 at 8:16
Do not use eqnarray: tex.ac.uk/cgi-bin/texfaq2html?label=eqnarray – Joseph Wright Feb 6 '11 at 8:17

\documentclass {article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
a &= b\\

Note that Leo replaced eqnarray with align, which is the recommended thing. – Hendrik Vogt Feb 6 '11 at 8:22
I'm sure there's already a command defined by amsmath that does exactly this... But I can't remember what it's called. – Seamus Feb 6 '11 at 12:38
@Seamus: I tried to find it in amsmath and mathtools, but failed. – Leo Liu Feb 6 '11 at 15:09
@Seamus: This is almost how standard LaTeX does: use \refstepcounter to set the counter and cross reference, and output the number. Maybe this command should be put into mathtools. – Leo Liu Feb 7 '11 at 11:03
@Seamus: Yes. Use \label after \addtag. hyperref just redefine \refstepcounter etc. – Leo Liu Feb 7 '11 at 11:18