Menu

#12 trackchanges is incompatible with bibtex

open
nobody
None
5
2024-11-02
2011-05-17
No

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}

?
########################################

Discussion

  • M J Brodzik

    M J Brodzik - 2012-02-21

    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

     
  • Ian Cohen

    Ian Cohen - 2013-02-12

    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

     
  • mlg

    mlg - 2014-09-12

    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) :

    \documentclass{article}
    \usepackage[inline]{trackchanges}
    \soulregister\ref7
    \soulregister\cite7
    \begin{document}
    \section{A Section}\label{sec:asec}
    \add{blabla \cite{someref} blablabla, see Section \ref{sec:asec}}
    \bibliographystyle{plain}
    \bibliography{ref_file}
    \end{document}
    

    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[...]"

     
    • Etienne Becht

      Etienne Becht - 2015-09-02
      That worked for me. Thanks !
      
       
  • Jorge

    Jorge - 2024-11-02

    Way late to the party (10 years), but this solution worked for me:

    \documentclass[times,thesis]{uom_thesis_casson}
    \usepackage[inline]{trackchanges}
    \soulregister\ref7
    \soulregister\cite7
    \addeditor{JM}
    
     

Log in to post a comment.

MongoDB Logo MongoDB