0

I am using latexdiff for marking up corrections requested by the examiners to my PhD thesis. I have a strange issue with this.

Upon compiling the diff.tex file, I get a specific string 4.0pt=-.55ex at the beginning of each deleted text throughout the document. See this figure.

gibberish at beginning of deleted string

In the source file diff.tex, the highlighted entires correspond to these lines

\DIFdelbegin \DIFdel{references are }\DIFdelend
\DIFdelbegin \DIFdel{\textbf{modified}}\DIFdelend
\DIFdelbegin \DIFdel{Creative Commons Attribution ...}\DIFdelend
\DIFdelbegin \DIFdel{they attribute it, that they :}\DIFdelend
\DIFdelbegin \DIFdel{that they do not alter, transform ...}\DIFdelend

The preamble generated by latexdiff for this diff.tex defines these commands as follows

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

I have tried searching for the string 4.0pt=-.55ex in the diff.tex file, but not even a portion of this exists anywhere! From where is this spurious string originating, and how do I get rid of this problem?

  • as always it would be much easier to help if you provided an example. – David Carlisle Dec 31 '18 at 18:01
4

My crystal ball says that you are redefining \ULdepth:

\documentclass{article}
\usepackage{color}
\usepackage{ulem}
\renewcommand\ULdepth{4.0pt} %<--- wrong
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} 
\begin{document}
\DIFdelbegin \DIFdel{references are }\DIFdelend
\DIFdelbegin \DIFdel{\textbf{modified}}\DIFdelend
\DIFdelbegin \DIFdel{Creative Commons Attribution ...}\DIFdelend
\DIFdelbegin \DIFdel{they attribute it, that they :}\DIFdelend
\DIFdelbegin \DIFdel{that they do not alter, transform ...}\DIFdelend

\end{document}
  • @UlrikeFisher, happy new year. Prima facie, your crystal ball indeed seems to be correct. Only the underline based styles have a problem. I am already using the ulem package with this custom depth in my thesis. How can I make this work with the underline style provided by latexdiff? – Krishna Dec 31 '18 at 18:53
  • @Krishna it's always wrong to redefine a length resgister with \renewcommand you should set the length with \setlength not redefine it so it is no longer a length. that is true in general not just for ulem or latexdiff. – David Carlisle Dec 31 '18 at 19:06
  • 1
    Use \setlength\ULdepth{4pt} instead. – Ulrike Fischer Dec 31 '18 at 20:03
  • 1
    @Krishna \ULthickness is a macro which should be redefined with \renewcommand, not a length register, – David Carlisle Dec 31 '18 at 20:16
  • 2
    \ULdepth and \ULthickness is not the same. – Ulrike Fischer Dec 31 '18 at 20:18

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.