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

I have a certain piece of latex code that is giving me problems with compilation after I did a latexdiff.


Gives me a diff file containing:

\DIFaddbegin \LTcapwidth\DIFadd{=\textwidth
}\DIFaddend \begin{landscape}

But upon compilation I get the errors: ! Missing number, treated as zero and ! Illegal unit of measure (pt inserted) on that line.

Question: Is there a way to have latexdiff ignore a certain piece of text?
(in this case I assume I would like to ignore \LTcapwidth=\textwidth.)

I played around with the latexdiff option --exclude-safecmd="LTcapwidth,textwidth" but that didn't really help as the equal sign between both commands is still diff'ed (i.e., I get \DIFaddbegin \LTcapwidth\DIFadd{=}\textwidth\DIFaddend \begin{landscape})

share|improve this question
Have you tried using LaTeX syntax for this command: \setlength{\LTcapwidth}{\textwidth}. latexdiff does not guarantee to work on plain tex syntax. – Andrew Swann Aug 27 '13 at 8:36
While this does resolve the problem (thanks!), I am looking for a solution that does not require me to change the latex file (multiple people working on it, svn repo, etc.). – Rabarberski Aug 27 '13 at 8:42

Your Answer


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

Browse other questions tagged or ask your own question.