# Alternative to IEEEeqnarray

By recommendation from The Not So Short Introduction to LaTeX, I have been using the IEEEeqnarray environment a lot, since it solved many of the rather annoying problems related to the alignenvironment. But because of its limited documentation and the changes it causes to other environments like enumerate, I have started to look for alternatives.

The advantages for the IEEEeqnarray are:

• The command \IEEEyesnumber, which allows you to insert equation numbers in an IEEEeqnarray* environment. That made it a lot easier to just insert equation numbers in one row without having to write \nonumber at the end of every single line like in the align environment.

• It included the option to edit the width of the columns, like in the array environment. The syntax was: \begin{IEEEeqnarray*}{rCl}, and it was a really nice option.

Does anybody know a way to achieve the same advantages with other environments?

-
Welcome to TeX.SE. I'd use align, or alignedat (and the starred variants), or array. Those can do everything mentioned above. An excellent reference for math mode is Herbert Voss' comprehensive review of mathematics in (La)TeX. –  Peter Grill Oct 11 '12 at 19:26
I know that the align environment can do this, but not as easily as what I mention above. For instance, if I have four rows, but only want an equation number on the last one, I have to write \nonumber after each of the other four lines. But in the IEEEeqnarray*, I could just write IEEEyesnumber after the fourth line, which was a lot easier. –  Gaussler Oct 11 '12 at 19:37
With the align* numbers are not added, but if include a \tag to the end of the equation you can number them. So this would be used instead of IEEEyesnumber. –  Peter Grill Oct 11 '12 at 19:43
Yes, but that would not support dynamical numbering and referencing. \IEEEyesnumber does exactly that. With this, you can write a \label and then reference it just like in the align environment. –  Gaussler Oct 11 '12 at 20:02
If the IEEEtrantools package is loaded with the retainorgcmds option standard LaTeX environments like enumerate are not changed. The IEEEeqnarray environment is documented in Appendix F of the IEEEtrantools package documentation. –  mhp Oct 12 '12 at 8:34

It seems that you main reason for using IEEEeqnarray* is the fact that you can select to number only a certain equation. You can achieve this with using align* and then tag/\label the equations you want numbered.

Below I have defined a \IEEEyesnumber which provides the required functionality, and you can \label and \ref them as desired:

## Code:

\documentclass{article}
\usepackage{amsmath}

\newcommand*{\IEEEyesnumber}{\refstepcounter{equation}\tag{\theequation}}%

\begin{document}
\begin{align}
a &= b \\
c &= d \label{eqn:Align} \\
f & = g
\end{align}

\begin{align*}
a &= b \\
c &= d \IEEEyesnumber\label{eqn:AlignStar} \\
f & = g
\end{align*}

In \verb|align| the equation was \ref{eqn:Align}, and in \verb|align*| it was \ref{eqn:AlignStar}.
\end{document}

-

i've stolen this example from peter grill and made a slight change -- using aligned within equation to get just one number for the second display.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
a &= b \\
c &= d \label{eqn:Align} \\
f & = g
\end{align}

\begin{aligned} a &= b \\ c &= d \\ f & = g \end{aligned} \label{eqn:Aligned}

In \verb|align| the equation was \ref{eqn:Align}, and in the structure
using \verb|aligned| it was \ref{eqn:Aligned}.
\end{document}


for more possibilities, see the amsmath documentation (texdoc amsmath from a tex live installation).

-
texdoc amsmath also works in MikTeX. –  Sveinung Oct 11 '12 at 22:40

To prevent IEEEtrantools from altering the list environments, just load it with its retainorgcmds option:

\usepackage[retainorgcmds]{IEEEtrantools}


This is now the default operation for version 1.3 and later of IEEEtrantools.

Version 1.3 also now works properly with hyperref links.

The documentation of IEEEeqnarray is extensive. See Appendix F of the IEEEtran HOWTO: http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ as well as Section XI for the IEEEitemize, IEEEenumerate, etc. lists. Lastly, additional IEEEtrantools.sty specific documentation can be found in the IEEEtrantools_doc.txt file.

-