# Using latexdiff with IEEEeqnarray environment

Note: I asked this question on Stackoverflow a month ago, but I'm deleting it and re-posting it here because I got no answers there.

I recently discovered latexdiff, and it has generally been a satisfaction. However, I have been encountering problems using it with the IEEEeqnarray environment from the IEEEtrantools package (which I use a lot). Here is a minimal example of this problem.

File a.tex:

\documentclass{article}

\usepackage{IEEEtrantools}

\begin{document}

\begin{IEEEeqnarray*}{rCl}
a^2 &=& b
\end{IEEEeqnarray*}

Some text.

More text.

Even more text.

\end{document}


File b.tex:

\documentclass{article}

\usepackage{IEEEtrantools}

\begin{document}

Some text.

More text.

Even more text.

\begin{IEEEeqnarray*}{rCl}
a^2 &=& b
\end{IEEEeqnarray*}

\end{document}


Output of latexdiff a.tex b.tex (I'll spare you the preamble):

\begin{document}

\DIFdelbegin %DIFDELCMD < \begin{IEEEeqnarray*}{rCl}
%DIFDELCMD < %%%
\DIFdel{a^2 }%DIFDELCMD < &%%%
\DIFdel{=}%DIFDELCMD < & %%%
\DIFdel{b
}%DIFDELCMD < \end{IEEEeqnarray*}
%DIFDELCMD <

%DIFDELCMD < %%%
\DIFdelend Some text.

More text.

Even more text.

\begin{IEEEeqnarray*}{rCl}
}\end{IEEEeqnarray*}

\end{document}


So it seems that latexdiff is not recognizing that IEEEeqnarray is a math environment since it is removing it, giving compilation errors such as:

! Missing $inserted. <inserted text>$
l.31 \DIFdel{a^2 }
%DIFDELCMD < &%%%


Is there a way to tell it that IEEEeqnarray is a math environment? If not, what solutions would you suggest?

Thanks!

Update: I tried to modify the latexdiff script itself by adding IEEEeqnarray to the list of eqnarray-like environments. This makes latexdiff treat it correctly as a math environment, but it raises another issue: IEEEeqnarray takes the mandatory alignment argument (rCl in the examples above), but latexdiff does not recognize that, leading to output of the form:

\DIFaddbegin
}\end{IEEEeqnarray*}


As you can see, the argument to IEEEeqnarray gets changed to \DIFadd{rCl} which leads to compilation errors:

! Class IEEEtran Error: Invalid character in column specifications.

See the IEEEtran class documentation for explanation.
Type  H <return>  for immediate help.
...