TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to force latexdiff not to parse TikZ figures? When I run latexdiff on a document where there is something like

\end{figure}  % corrected typo

It parses also the TikZ figure code and the diff is not a correct TikZ figure anymore.

share|improve this question
I think that you should provide an pair of files that get "broken" by latexdiff, so that people trying to solve your problem get a good starting point from you. – yo' Oct 17 '12 at 12:03
up vote 4 down vote accepted

As it is hard to generate a correct diff for TikZ figures I think your approach to exclude them completely is the best way.

You can call latexdiff with the parameter -c <config file>. In the configuration file you can specify which enviroments latexdiff should ignore. Taken from the manual:

PICTUREENV Within environments whose name matches the regular expression in PICTUREENV all latexdiff markup is removed (in pathologic cases this might lead to inconsistent markup but this situation should be rare). Default: (?:picture|DIFnomarkup)[\w\d*@]*

So with the regex (?:picture|tikzpicture|DIFnomarkup)[\w\d*@]* it should not parse TikZ figures.

share|improve this answer
That is, you should type latexdiff -c "PICTUREENV=(?:picture|tikzpicture|DIFnomarkup)[\w\d*@]*" old.tex new.tex > diff.tex. ` – Clément May 4 at 2:12

Your Answer


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.