Monday, November 12, 2018

Marking changes in edited pdf

latexdiff, a Perl script coming with TeXLive, is just great. Once you have the original.tex and the edited.tex both compiling well, one can generate a diff.tex with all the differences marked in customizable colors. There is an error if one uses hyperref and has changes within the \section etc. commands, however.

A workaround is excluding those commands from the parsing operation:

latexdiff --exclude-texcmd="section,subsection,subsubsection" original.tex edited.tex > diff.tex