Closed JoTrab closed 4 years ago
Thanks for the report. This is something that works out of the box for me with natbib package, e.g. this is what latexdiff generates automatically for a citation for me:
\DIFaddbegin \bibitem[{Juli\`a et~al.(2000)Juli\`a, Ammon, Herrmann, and
Correig}]{julia2000joint}
\DIFadd{Juli\`a, J., Ammon, C.~J., Herrmann, R.~B., Correig, A.~M., 2000. }{\DIFadd{Joint
inversion of receiver function and surface wave dispersion observations}}\DIFadd{.
Geophys. J. Int. 143, 99--112, doi:10.1046/j.1365-246x.2000.00217.x.
}
\DIFaddend
So you have to be a more specific what packages you use exactly for preparing your bibliography. Maybe you can post a complete MWE, i.e. including the full tex for a very simple document (old and new versions, along with any needed sequence). I might not deal with this issue immediately, but if the package is popular, and more people report in with this problem, this would bubble up in priority.
Just looking at your text I can see two possible issues:
--allow-spaces
as workaround, but as latexdiff does not know about the other \bibxxx commands they will all be excluded from the highlighting)--disable-citation-markup
but this will probably also stop in-text highlighting of new/deleted citations).The best work-around for you might be to put all the citations in separate file and not process it with latexdiff, but include as-is. Of course, you lose the highlighting. Or switch to natbib but I guess that might not be acceptable for you.
Thanks for the quick answer. I usually use natbib, so great to hear that it works. In this specific case I actually copied the created bibliography into the texfile (required for submission to a scientific journal, apparently to be sure not to have any problems for compilation on their servers). The bibliography itself was created through revtex, I'll try to put together a MWE soon. For the moment I´l just l continue putting the citations in a separate file for latexdiff.
I am facing the same issue, although I may be using a different latex template than @JoTrab. In my case I have the bibliography on a separate file, and citing the references with \cite{#TAG}. The result is the same highlighted here:
\DIFdelbegin %DIFDELCMD < \cite{Wei2014a}%%%
\DIFdelend \DIFaddbegin \cite
{\DIFadd{Wei2014a}}\DIFaddend
The journal template used is this one: cabios-template.zip. I can work around the error if I use the argument --allow-spaces
previously suggested.
I hope this helps in finding the cause! Cheers!
I am facing the same issue, although I may be using a different latex template than @JoTrab. In my case I have the bibliography on a separate file, and citing the references with \cite{#TAG}. The result is the same highlighted here:
\DIFdelbegin %DIFDELCMD < \cite{Wei2014a}%%% \DIFdelend \DIFaddbegin \cite {\DIFadd{Wei2014a}}\DIFaddend
The journal template used is this one: cabios-template.zip. I can work around the error if I use the argument
--allow-spaces
previously suggested.I hope this helps in finding the cause! Cheers!
Super helpful! Thanks!
I noticed that difflatex has problems with the bibliography. For me the pdflatex output failed when I added a new entry to the . Each field in the bibitem is added through \DIFadd which seems to result in the error. Enclosing the whole entry into DIFadd manually works.
Example:
fails
but