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
518 stars 73 forks source link

cannot generate correctly the difference of a table #298

Closed vincferr closed 6 months ago

vincferr commented 6 months ago

I would like to report an error I have been encountering while comparing two tables with latexdiff.

When trying to generate the difference of these two files example.zip

using the commands

latexmk old.tex -auxdir=./aux -pdf -interaction=nonstopmode -f # it works
latexmk new.tex -auxdir=./aux -pdf -interaction=nonstopmode -f # it works
latexdiff --ignore-warnings --math-markup=2 --type=UNDERLINE old.tex new.tex > ./diff.tex
latexmk diff.tex -auxdir=./aux -pdf -interaction=nonstopmode -f # it crashes

the last command crashes with the error:

! Misplaced \noalign.
\toprule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\abovetopsep \global \@b...
l.151           \DIFaddendFL \toprule

!  ==> Fatal error occurred, no output PDF file produced!

Interestingly enough, if I comment out in both files the command \usepackage[dvips]{graphicx} at line 34 I have two effects:

! Misplaced \omit.
\multispan ->\omit 
                   \@multispan 
l.116 ... \DIFaddbeginFL \multicolumn{3}{l|}{trad}
                                                   \DIFaddendFL \\
....

Since I run in force mode -f, it still able to produce a pdf, albeit it is probably not right looking.

Any idea on how can I fix/mitigate these errors? Thanks!

os: Ubuntu 22.04 pdfTeX: Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian)
latexdiff: 1.3.3 (but latest master behaves in the same way) latexmk: 4.76

vincferr commented 6 months ago

Ah I see that `--graphics-markup=none' is a suggested workaround for table problems. And it seems to fix it indeed! I will close the issue, but feel free to add any suggestions you might have