ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
513 stars 72 forks source link

Differences in displayed math are not handled correctly #224

Open tobiasleibner opened 3 years ago

tobiasleibner commented 3 years ago

I noticed this in one of my documents, but it also seems to happen in your testsuite. See the units test. Here, the lines

\begin{displaymath}
\unit[1.1 \times 10^{-3}]{km}
\end{displaymath}

in units-old.tex and

\begin{displaymath}
\unit[1 \times 10^{-3}]{km}
\end{displaymath}

in units-new.tex are converted into the diff

\begin{displaymath}
\DIFdelbegin %DIFDELCMD < \unit[1.1 \times 10^{-3}]{km}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \unit[1 \times 10^{-3}]{km}
\DIFaddend \end{displaymath}

which only shows the new value. Moreover, the new value is not marked as an addition (it is black instead of blue).