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\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.\protect
is not enough. But removing thecite
package is enough. As mentioned, thecite
package is not required to use the\cite
command\noexpand\cite
to keep\deleted
from expanding too much too early.changes
usesulem
to make the strikethrough part. It is well known that this does not always work. Try if\mbox{\cite{...}}
works.ulem
manual explicitly mentions\mbox{\cite{....}}
as a work around.