1

I have an error trying to compile a very simple latexdiff file:

\documentclass{article}

%DIF 51a51
 %DIF > 
%DIF -------
\newcommand{\diffblock}[1]{#1}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}                      %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

\begin{document}
\DIFadd{ by
\[ AAA \]
}

\end{document}

Here is the output of compiler:

[PDFLaTeX] diffrevised.tex => diffrevised.pdf (pdflatex)
[PDFLaTeX] finished with exit status 1
./diffrevised.tex:30:Bad math environment delimiter. }
[PDFLaTeX] 1 error, 0 warnings, 0 badboxes

I don't understand what's going on.

  • 1
    Place the math delimiters outside of your macro: \[ \DIFadd{by AAA} \] – Steven B. Segletes Mar 5 '14 at 15:05
  • 1
    I very much doubt that the script as shown was generated by latexdiff as there should be additional \DIFaddbegin and \DIFaddend tags. Can you provide the old and new input files (Minimum Working Example) as well as version number of latexdiff used. – frederik Mar 12 '14 at 8:52

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.