# Conflict with cite and changes

For a scientific publication, I am writing a modified version of my article which takes in account the comments of my reviewers. I need to identify which modification is due to which reviewer, so I use the changes package. Obviously, I have references in my article, so I use the cite package.

PDFLaTeX (TexLive 2014) gives me errors when I use the cite command within the deleted or replaced commands of the changes package. Here is a minimal working example:

\documentclass{article}

\usepackage{cite}
\usepackage{changes}

\begin{document}

As previously observed \deleted{in \cite{someref}, there is no banana here.}

\begin{thebibliography}{9}
\bibitem{someref}
Some ref here.
\end{thebibliography}

\end{document}


I get the following errors:

! Extra }, or forgotten \endgroup.
\UL@stop ...alty \ifnum \lastkern =\thr@@ \egroup
\egroup \ifdim \wd \UL@box...
l.8 ...n \cite{someref}, there is no banana here.}

! Extra }, or forgotten \endgroup.
\UL@stop ...num \lastkern =\thr@@ \egroup \egroup
\ifdim \wd \UL@box =\z@ \e...
l.8 ...n \cite{someref}, there is no banana here.}

! Missing } inserted.
<inserted text>
}
l.8 ...n \cite{someref}, there is no banana here.}

! Missing } inserted.
<inserted text>
}
l.8 ...n \cite{someref}, there is no banana here.}


If I remove the cite packages, everything is back to normal. Unfortunately, I need this package.

The question is really close to this unanswered one. What should I do?

• Not at pc, but does \protect\cite help? Note that the cite package us not required to use \cite, that command is already in the core, so you can probably do without it. – daleif Jul 10 '17 at 17:07
• Now I tested it, \protect is not enough. But removing the cite package is enough. As mentioned, the cite package is not required to use the \cite command – daleif Jul 11 '17 at 7:01
• Hmm, it does seem to work if you use \noexpand\cite to keep \deleted from expanding too much too early. – daleif Jul 11 '17 at 9:34
• I don't think that many people uses the package. The main issue is that changes uses ulem to make the strikethrough part. It is well known that this does not always work. Try if \mbox{\cite{...}} works. – daleif Jul 11 '17 at 12:44
• The ulem manual explicitly mentions \mbox{\cite{....}} as a work around. – daleif Jul 11 '17 at 12:55

As daleif pointed out in comments, the problem is due to the ulem package used to strike deleted changes in the changes package. It is known to behave weirdly for some commends, among them cite.
As indicated in the documentation, you have to wrap your cite in a mbox like this:
As previously observed \deleted{in \mbox{\cite{someref}}, there is no banana here.}