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 am using latexdiff for diffing 2 versions of a document and the file created breaks whenever there is as change to chapters, sections, subsections, etc, or when this chapters,sections are added or removed entirely from the text.

latexdiff creates this when a section is added:

\DIFaddbegin \section{\DIFadd{Scope of the document}}

it creates this when a section is different:

\section{\DIFdelbegin \DIFdel{Scipe }\DIFdelend \DIFaddbegin \DIFadd{Scope }\DIFaddend of the document}

Both these lines break when compiling, giving the following statement:

! Argument of \UL@word has an extra }.

Can anyone help with my problem? Does anyone know of a better diff tool for latex files?

PS: I use the command:

perl latexdiff old.tex new.tex > diff.tex

share|improve this question
This works fine for me. Do you have the latest version of latexdiff? Mine is LATEXDIFF 1.0.3 (Algorithm::Diff 1.15 so, Perl v5.12.4) –  Andrew Swann Aug 27 '13 at 9:12
@AndrewSwann Yes I have the same version as you. It generates the file correctly, but when I try to compile it it doesn't. It breaks on section, chapter, etc, stating that there is an extra } –  morcillo Aug 27 '13 at 14:21
The diff file I get compiles fine. Is your latex installation up to date. You could add \listfiles at the top of diff.tex and show us the output from the log file. –  Andrew Swann Aug 27 '13 at 18:18

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.