This example fails to generate a valid .tex:
test.tex
\documentclass[a4paper]{report}
\begin{document}
\begin{description}
\item[thing] explanation of thing
\end{description}
\end{document}
test_modified.tex
\documentclass[a4paper]{report}
\begin{document}
\begin{description}
\item[A first thing] an explanation of first thing
\end{description}
\end{document}
Executing
latexdiff test.tex test_modified.tex > test_diff.tex pdflatex test_diff.tex
yields
! LaTeX Error: Something's wrong--perhaps a missing \item.
l.25 ...
Here is the block of interest in the generated .tex:
\begin{document}
\begin{description}
\DIFdelbegin %DIFDELCMD < \item[thing] %%%
\DIFdel{explanation of }\DIFdelend \DIFaddbegin \item[A first thing] \DIFadd{an explanation of first }\DIFaddend thing
\end{description}
\end{document}
So latexdiff has inserted code before the \item, and the compiler does not like it.
Now the manpage says latexdiff has options to exclude commands. I tried to add
--exclude-safecmd="\\\item"
in the command line invoking latexdiff, with no success.
Has anyone ever tweaked the options of latexdiff and could say how to circumvent the bug (e.g. tell latexdiff to skip this kind of environment)?
--exclude-safecmd="diffblock"to get this working with an earlier version that did not have a\diffblock{}yet. – Frank Breitling Sep 07 '16 at 15:04