1

Using natbib together with hl or st from soul (or soulutf8) produces Argument of \@citex has an extra }. [{\st\cite] errors, as already mentioned in other questions.

While a solution is to wrap all the \cite commands with an additional pair of curly brackets, or when this fails with \mbox, this solution may not be very convenient.

Consider in particular the situation in which we have a document, in which for some reason we are forced to use natbib for the references (like what happens when using revtex document classes). We have lots of text with lots of \cite in it. We want to define a command \remove that highlights text to be removed, with something like \newcommand{\remove}[1]{{\color{red}\st{#1}}}.

To use this command in blocks of text containing lots of \cite can be very annoying, requiring to wrap all of them with brackets or \mbox. Is there a way to define a "smarter" command that can be used over \cite without modifying the original text?


A MWE of the problem of using \hl and \cite together is already given in the linked question, but I'll include another just for completeness:

Tex file:

\documentclass{article}

\usepackage{soulutf8}
\usepackage{natbib}

% how can I more smartly define this command, to use it to wrap text containing \cite{...}?
\newcommand{\remove}[1]{{\st{#1}}}

\begin{document}

\remove{\cite{foo}}

\bibliography{bibliography}
\end{document}

bibliography.bib:

@article{foo,
 author = {SomeGuy},
 journal = {Somewhere},
 title = {Foo}
}
0

It seems that \sout from package ulem works.

| improve this answer | |
  • well, this seems to indeed be the case, thanks for reporting! The \st command from soul still seems to work slightly better (look for example at how the G is handled in the two), but this definitely a quick work around. I would still be interested to know if there is a way to make soul work in this context though – glS Mar 1 '17 at 22:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.