I try to use latexdiff to point out changes I have made in a document to the other people who need to read it and give me their advice... However, I've been getting this error:

Runaway argument?
{En rajoutant aux interactions la seconde main, qui dans notre cas es\ETC.
! Paragraph ended before \UL@on was complete.
<to be read again> 
l.8 }

regarding this section of code produced by latexdiff :

 \DIFdelbegin \DIFdel{En rajoutant aux interactions la seconde main, qui dans notre cas est la main gauche, l'interface pourrait devenir plus intuitive et plus facile à utiliser.



Where \DIFdelbegin, \DIFdel, \DIFdelend are defined as (in my main .tex, added automagically by latexdiff) :

\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE

What's wrong & what can I do now?

EDIT : If I replace the \sout{#1} by just #1 (i.e., remove the strike-through formatting), it works, but that strike-through kinda was the best feature of it, making it easy to spot what was removed. Is there another formatting command that would not break with a new paragraph?

If there was a strikethrough environment I could probably use it (by placing a \begin{strikethrough} in \DIFdelbegin and an \end{strikethrough} in \DIFdelend), but I don't think there is one.

  • 1
    If you remove the blank line in the argument to \DIFdel, does the error persist? – Willie Wong Nov 7 '10 at 19:32
  • 1
    No, but that's part of the problem. Latex diff is inserting this line automatically, I can't be editing all my files manually after latexdiff has parsed them, I'd rather look for another solution than be forced to do it manually. – levesque Nov 7 '10 at 19:37

I had exactly the same problem. Latexdiff seems to introduce Windows line endings, which seemed to caused the problem.

I now run dos2unix on the resulting latexdiff tex files and the problem has disappeared.

I'm running latexdiff 0.5 (Algorithm::Diff 1.15 so)

  • Awesome, I'll make sure to try that. – levesque Jan 20 '11 at 16:13
  • I had the same issue and this worked for me! – the_e Mar 6 '15 at 21:18

I got the same problem when I was doing difflatex in Mac. The exact same error ! What I did was moved up the "}" sign that was causing the problem to the the end of the paragraph and it worked. Don't ask me why, but it worked for me !!!


Instead of \sout, try the \st command from the soul package.

  • In my case, neither \sout nor \st work, even if I use the packages. – Frank Apr 6 '11 at 1:02

For me worked defining a new command hsout according to this post, which takes care of having multiple paragraphs in the command sout from the package ulem. Also using the definitions for \DIFadd and \DIFdel which take care of the using the color command for multiple paragraphs as suggested here, {\color{<color>}{...}}

\RequirePackage{color} %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\newcommand\hsout[1]{\let\helpcmd\sout\parhelp#1\par\relax\relax} %<-- new command
\providecommand{\DIFadd}[1]{{\color{blue}{#1}}}       %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\color{red}\hsout{#1}}}  %DIF PREAMBLE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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