0

I am writing a revised version of an article. I am using the changes package to keep track of my revisions.

There is a conflict when using \added, \deleted, or \replaced on a citation. This can be solved by using \mbox as suggested in this post. Unfortunately for me it only works for basic citation styles with numbers but not the "authors (year)" style (such as Harvard) required by the journal I am submitting to.

Here is a minimal working example:

\documentclass{article}


\usepackage{changes}
\usepackage{harvard}


\begin{filecontents}{references.bib}
    
@article{ref0,
    title = {title0},
    journal = {journaltitle 0},
    author = {author0},
    month = jan,
    year = {2011},
}   
@article{ref1,
    author = {author1},
    title = {title1},
    journal = {journaltitle 1},
    month = feb,
    year = {2022},
}
@article{ref2,
    author = {author2},
    title = {title2},
    journal = {journaltitle 2},
    month = mar,
    year = {2022},
}
\end{filecontents}

\begin{document}
    
I can cite \cite{ref0} \deleted{but not \mbox{\cite{ref1} \cite{ref2}}}

\bibliographystyle{dcu}
\bibliography{references}

\end{document}

I get the following error:

Argument of \XC@col@rlet has an extra }. ...ed{but not \mbox{\cite{ref1} \cite{ref2}}}
Paragraph ended before \XC@col@rlet was complete. ...ed{but not \mbox{\cite{ref1} \cite{ref2}}}

Any idea?

1 Answer 1

1

You can make the \cite command robust:

\usepackage{changes}
\usepackage{harvard}
\usepackage{etoolbox}
\robustify\cite

1
  • That worked, thanks!!
    – Andros
    Sep 11, 2021 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .