[Tex/LaTex] Latexdiff error (caused by multi paragraph \sout): Paragraph ended before \UL@on was complete

errorslatexdiff

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> 
               \par 
l.8 }
   %DIFDELCMD <
?

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.

}%DIFDELCMD < 

%DIFDELCMD < %%%
\DIFdelend

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.

Best Answer

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)