Closed vtraag closed 6 years ago
Another workaround: You can explicitly hint to latexdiff that amsmath package is loaded by using option --packages=amsmath
. However, this overrides automatic detection completely (probably a behaviour that ought to be changed).
Having said this, I just committed a modification to the automatic package scanning subroutine that now also treats options to \documentclass as potential package names, so the code you provided should now work without the workaround (commit 3e56ad7 )
When the
amsmath
package gets loaded through a documentclass (or another package possibly?), changes inalign
environments are changed toeqnarray
environments when diffed.old.tex
:new.tex
:Generated diff of the align environment:
In this case, it is only a minor problem, and compiling
diff.tex
only producesLaTeX Error: Too many columns in eqnarray environment.
In the actual context of a full article, the reported errors become more severe, and more difficult to track down.
Workaround
A workaround is easy: load the
amsmath
explicitly innew.tex
. I just wanted to document this here, since it took me quite some time to come up with this workaround.Perhaps this can be solved in
latexdiff
in some way, but I can imagine it would be rather difficult to detect whetheramsmath
may have been loaded through some third package or documentclass. Nonetheless, the error of a missingalign
environment may be somewhat easier to recognize and correct for if necessary.