# IEEEtrantools clash with cleveref

I have two rather complex equations I would like to align at the two points to the left and to the right of the '=' sign.

Elsewhere in the document I am using cleveref's \cref command, but that package clashes with IEEEtrantools.

\documentclass{report}

\usepackage[retainorgcmds]{IEEEtrantools}
\usepackage{cleveref}

\begin{document}

\begin{IEEEeqnarray}{rCl}
a & = & 3\\
b & = & 4
\end{IEEEeqnarray}

\end{document}


Further would I like to give these two equations one tag, that should be displayed right-aligned and vertically centred.

I took the equations from a book (Bohren and Huffman, 2004) and would like to keep both, their numbering and their formatting, which looks like this:

How can this be achieved, with cleveref being kept?

This is a bug in cleveref that has not taken into account some changes made to IEEEtrantools.sty. In particular, the conditional \if@IEEEissubequation is not any more in the package. The patches made by cleveref refer to version 1.2 of IEEEtrantools, but you probably have version 1.3 (2012/12/27).

You can try by adding some code that will avoid the error:

\usepackage[retainorgcmds]{IEEEtrantools}
\usepackage{cleveref}

\makeatletter
\let\if@IEEEissubequation\iffalse
\makeatother


However, I'm not certain this won't have strange consequences.

As far as centering a unique number for the two equations, I believe this is not covered by IEEEeqnarray, but aligned of amsmath will do:

\begin{aligned} a &= b \\ c & = d \end{aligned}


I think that you can load both amsmath and IEEEtrantools.

Change the order of the packages:

\documentclass{report}
\usepackage{cleveref}
\usepackage[retainorgcmds]{IEEEtrantools}
\begin{document}

\begin{IEEEeqnarray}{rCl}
& \begin{array}{rcl}
a & = & 3\\
b & = & 4
\end{array}
\end{IEEEeqnarray}

\end{document}


However, it makes more sense to use the amsmath package and then the align environments.

\documentclass{report}
\usepackage{cleveref}
\usepackage{amsmath}
\usepackage[retainorgcmds]{IEEEtrantools}
\begin{document}

\begin{align}
\begin{aligned}
a & =  3\\
b & =  4
\end{aligned}
\end{align}

\end{document}

• Reversing the package load order is wrong. It might avoid the compilation error in this MWE, but it completely disables cleveref's IEEEtrantools support and risks producing nonsense cross-references (without any warning!) – Toby Cubitt Jun 13 '17 at 16:57

Compatibility with newer versions of IEEEtrantools should be fixed in the latest pre-release version (0.21) available from my web site: http://www.dr-qubit.org/latex.html