The trackchanges package causes problems when used with bibtex.
The following latex code:
#############
\documentclass{article}
\usepackage[inline]{trackchanges}
\begin{document}
\add{blabla \cite{someref} blablabla}
\bibliographystyle{plain}
\bibliography{ref_file}
\end{document}
#############
with a file ref_file.bib containing:
#################
@article{someref,
author = {J. Dupont and S. Smith},
title = {{Some title}},
journal = {some journal},
year = {2011},
volume = {114},
number = {B11},
pages = {B11308},
month = {jan}}
######################
returns the following error when compiled with pdflatex:
###################################################
loading : Context Support Macros / Miscellaneous (2004.10.26)
)
loading : Context Support Macros / PDF (2004.03.26)
)
! Argument of \@citex has an extra }.
<inserted text>
\par
l.4 \add{blabla \cite{someref} blablabla}
?
########################################
I have run into the same problem. The only workaround I have would be to remove the citation from the \add command, like this:
\add{blabla }\cite{someref}\add{ blablabla}
but it is not very satisfactory when you have a lot of references to add. If there is another alternative I would be interested.
--MJBrodzik
I was having the same problem, I found that inserting the \protect command before the citation seemed to fix the issue.
i.e. \add{ text \protect \citet{Smith:00} text}
- Ian
I'm late to the party but since this bug is still open and using \protect didn't work for me, here's another suggestion, using \soulregister\cite7 (and \soulregister\ref7, so references will work as well) :
This solution was inspired by this post:
http://tex.stackexchange.com/questions/139463/how-to-make-hl-highlighting-to-automatically-place-incompatible-commands-in
"When a command is registered this way, [the package] soul will first expand it (including the argument), and then feed the result as a whole to its scanner[...]"
Way late to the party (10 years), but this solution worked for me: