9

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\\ 
c &=& d  \addnumber\\ 
e &=& f\\
g &=& h\\
i &=& j
\end{eqnarray*} 
David Carlisle
  • 757,742
TCL
  • 1,140
  • For some reason \ shows like \ above. – TCL Feb 06 '11 at 05:39
  • 1
    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 06 '11 at 08:16
  • 7
    Do not use eqnarray: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=eqnarray – Joseph Wright Feb 06 '11 at 08:17

1 Answers1

14
\documentclass {article}
\usepackage{amsmath}
\newcommand\addtag{\refstepcounter{equation}\tag{\theequation}}

\begin{document}

\begin{align*}
a &= b\\ 
c &= d  \addtag \\ 
e &= f\\
g &= h\\
i &= j
\end{align*}

\end{document}
David Carlisle
  • 757,742
Leo Liu
  • 77,365