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})

  • 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
  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.