Closed anka-213 closed 1 month ago
Based on this https://github.com/ftilmann/latexdiff/blob/33316f4c875f3a5bcd9b681c17015dc1deff7a5e/latexdiff#L2667
i discovered that --exclude-safecmd=AMPERSAND
works.
I like this: a bug report that already does the hard work of finding the pathway to solution. I have simply made it default behaviour now to declare \& (ie \AMPERSAND internally) an unsafe command if tikz-dependency package is detected or declared. The fix is a little of a hack as really it should only be considered unsafe within dependency environment, and here is declared globally unsafe. It's not difficult to fix do this fix also, but I am not sure the usage number of dependency, and the relatively minor inconvenience of invisible changes to \& in the text do not convince me it's worth the additional code complexity. Commit a789b50
Here is a minimal example:
Running latexdiff with it would wrap the ampersands in a command, which is not allowed:
I tried adding
--exclude-safecmd='&'
to no avail.