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?
\protect\citehelp? 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\protectis not enough. But removing thecitepackage is enough. As mentioned, thecitepackage is not required to use the\citecommand – daleif Jul 11 '17 at 07:01citefor other features not present in the MWE. – Neraste Jul 11 '17 at 09:21\noexpand\citeto keep\deletedfrom expanding too much too early. – daleif Jul 11 '17 at 09:34\noexpandallow the computation to run, but it does not show the reference number any more in the final document. – Neraste Jul 11 '17 at 12:20changesusesulemto 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:44ulemmanual explicitly mentions\mbox{\cite{....}}as a work around. – daleif Jul 11 '17 at 12:55\mboxseems to do the trick (in the MWE and in my complete case as well). Thanks! – Neraste Jul 11 '17 at 13:55