Open ianhbell opened 3 years ago
Thanks for the well-documented report and sorry for my slow reaction. It seems the redefinition of commands that \DIFaddbegin introduces is not possible within the tabular environment, which I was not aware off.
There is currently no solution but as a work-around you can use --graphics-markup=none
option, with which the example works. The only downside is that new images will not be highlighted with a blue frame anymore but this was more eye candy and probably not that critical. I will leave the issue open, but the ability to fix this is probably beyond me, as it relates to the interaction within the tabular environment. I added a note to the documentation to be aware of this problem
I neither know the script nor Perl or TeX, but could this page help? (I. e., will the problem be solved by redefining the commands in \DIFaddbegin only locally?) Do I see it correctly that, when using the workaround, it is not marked in the difference file that there is a difference in the table between the compared files?
Thank you for the suggestion. Unfortunately the redefinition has to be non-local to work, so the linked hint does not help. The workaround only affects the markup of graphics (images), not the markup in the table. For most purposes it's not a big deal I would think.
TL;DR: When graphicx package is included, addition of a column to a table doesn't result in buildable diff. Otherwise, no problem. Sadly I need graphicx to add figures to document.
Original with 2 columns:
New with 5 columns:
Generated diff:
Build log with
xelatex.exe -synctex=1 -shell-escape -interaction=nonstopmode "coldiff".tex
: