[Tex/LaTex] How to label only one line of an equation array

equationsnumbering

Consider the following commands to create a labelled multi-line equation array:

\begin{eqnarray}
\label{eqn:1}
X&=&Y+Z\\
&\leq & U \times W.

\end{eqnarray}

It creates a two-line equations with two numbers. How can I associate only one equation number to this two-line equations? or better, how can I associated different equation numbers to each line? (of course, without breaking the equation array into several disjoint equations!)

Best Answer

amsmath provides a similar interface to eqnarray, but is better in terms of it's horizontal spacing/alignment:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align}
  X &= Y + Z \label{eqn:1} \\
    &\leq U \times W. \nonumber \\
    & = Y + Z \tag{a}
\end{align}
\end{document}

\nonumber removes the number for that line in the align environment. \tag can also be used to create a manual tag.