[tex-live] latexdiff: ulem interacting with textbf+citet

kap4lin kap4lin at gmail.com
Thu Jan 21 18:38:14 CET 2010


Hi,

I understand this may not be the right list, so I am Cc-ing the author
of latexdiff as well.

A "simple" problem while using latexdiff: \sout (or \uwave) of ulem
interacting with the combination of \textbf{} and \citet{}. Minimum
working example follows. The solution that I have is to use '-t CFONT'
when calling latexdiff. Any other solution (which includes sout and/or
uwave) is highly appreciated.

-- 
Regards
Kap4Lin
--------------------------------------
http://counter.li.org  #402424

%% file1.tex  BEGIN
\documentclass[12pt]{article}
\usepackage[longnamesfirst]{natbib}

\begin{document}

\textbf{\citet{dn97} made no provision for underlining text.}

%%   Bibliography  %%

\begin{thebibliography}{1}
\newcommand{\enquote}[1]{``#1''}
%\newcommand{\enquote}[1]{#1}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab{#1}\fi

\bibitem[\protect\citename{Knuth, }1997]{dn97}
Knuth, D. (1997).
\newblock \enquote{The art of computer programming, volume 1:
fundamental algorithms.}
\newblock {\em Addison Wesley Longman Publishing Co., Inc. Redwood
City, CA, USA\/}.

\end{thebibliography}
\end{document}
%% END file1.tex


%% file2.tex BEGIN
\documentclass[12pt]{article}
\usepackage[longnamesfirst]{natbib}

\begin{document}

\citet{dn97} made no provision for underlining text.

%%   Bibliography  %%

\begin{thebibliography}{1}
\newcommand{\enquote}[1]{``#1''}
%\newcommand{\enquote}[1]{#1}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab{#1}\fi

\bibitem[\protect\citename{Knuth, }1997]{dn97}
Knuth, D. (1997).
\newblock \enquote{The art of computer programming, volume 1:
fundamental algorithms.}
\newblock {\em Addison Wesley Longman Publishing Co., Inc. Redwood
City, CA, USA\/}.

\end{thebibliography}
\end{document}
%% END file2.tex

# latexdiff command:
$ latexdiff file1.tex file2.tex >| file-diff.tex
# OR
$ latexdiff --exclude-textcmd="citet,citep" file1.tex file2.tex >| file-diff.tex

# pdflatex error (on second run):
$ pdflatex file-diff.tex
! Extra }, or forgotten \endgroup.
\UL at stop ...z@ \else \UL at putbox \fi \else \egroup
                                                  \egroup \UL at putbox \fi \if...
l.27 }
      \DIFdelend \DIFaddbegin \citet{dn97} \DIFadd{made no provision for und...


# WORKING latexdiff command:
$ latexdiff -t CFONT file1.tex file2.tex >| file-diff.tex


More information about the tex-live mailing list