Open felixvuo opened 5 months ago
latexdiff by default excludes from markup all commands except 'white-listed' ones known to contain only text. With the option --append-context2cmd=newglossaryentry
you essentially tell latexdiff that \newglossaryentry's second argument is text (see the help page) but this is not true, as it uses some syntax specific to the glossaries-extra package. I am afraid this is not easy to fix. It would require introducing some special logic so that only the parts right of the "=" sign are processed and probably not for all parameters. Something like this would probably be most straightforwardly accomplished in the preprocess subroutine, where the glossary command could somehow be reshaped that those second parts appear as textual argument, and then backtransformed into the required from in the postprocess. I will not fix this, but leave it open in case anybody else feels inspired.
The only actual 'fix' is of course to remove the --append-context2cmd option but of course it leaves your changes in the glossary unmarked.
I have added a new entry to my glossary and although latexdiff still makes a changes.tex, the generated file no longer compiles to pdf with pdflatex. Here's a minimum (not)working example:
Old:
New:
Command:
latexdiff --append-context2cmd=newglossaryentry mwe-old.tex mwe-new.tex > changes.tex
which produceschanges.tex
with no errors reportedBut then
pdflatex changes.tex
produces:line 64 is the last line, with closing brace, of this snippet:
Anything I can try to solve this? Many thanks.