Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to highlight the difference between two rather complex math tex-files and get a lot of errors. The files are complex in the math equations, fair enough to get errors, but what if I would like latexdiff to only compare the text OUTSIDE the \begin{align} ... \end{align} environment? Can one specify to exclude/ignore certain environments?

share|improve this question

1 Answer 1

Yes there is a way to do this. latexdiff has a class of environments that it regards as pictures and which it does not check. The value is stored in PICTUREENV and its default is (?:picture|DIFnomarkup)[\w\d*@]*. Writing a config file ld.cfg containing

PICTUREENV=(?:picture|DIFnomarkup|align)[\w\d*@]*

adds the align environment to this list. If this config file is placed in the current directory you can now run

latexdiff -c ld.cfg old.tex new.tex >diff.tex

and the content of your align environments will now be ignored.

share|improve this answer
1  
Note that you do not need to put it in a separate config file. You could also do latexdiff --config="PICTUREENV=(?:picture|DIFnomarkup|align)[\w\d*@]*" –  Rabarberski Aug 27 '13 at 9:11
    
@Rabarberski Indeed, remember double dash before config. However, the command starts getting long and one has to be careful about escaping. –  Andrew Swann Aug 27 '13 at 9:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.