Customizing latexdiff default (UNDERLINE) output styling
There is no standard option to do this, but you can create your own preamble file for latexdiff
to replace the highlighting commands. All you need to do after a standard run of latexdiff
is to copy the lines latexdiff
writes in to the header of the diff file and change those that do not fit your style. In your case the command to change is \DIFadd
that by default is
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
The wavy underlining is generated by \uwave{...}
, so removing this we get
\providecommand{\DIFadd}[1]{{\protect\color{blue}#1}}
A complete preamble file is then
\RequirePackage[normalem]{ulem}
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1}
\providecommand{\DIFadd}[1]{{\protect\color{blue}#1}}
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
\providecommand{\DIFaddbegin}{}
\providecommand{\DIFaddend}{}
\providecommand{\DIFdelbegin}{}
\providecommand{\DIFdelend}{}
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}}
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}}
\providecommand{\DIFaddbeginFL}{}
\providecommand{\DIFaddendFL}{}
\providecommand{\DIFdelbeginFL}{}
\providecommand{\DIFdelendFL}{}
which if you call this preamble.tex
can be used by latexdiff
via
latexdiff -p preamble.tex old.tex new.tex > diff.tex
With new.tex
\documentclass{article}
\begin{document}
The text now starts with this.
\end{document}
and old.tex
\documentclass{article}
\begin{document}
The text started with this.
\end{document}
this generates a diff.tex
that produces