6

I'm using latexdiff to show changes between versions of an article written with the achemso package, but it doesn't seem to be able to highlight changes within the bibliography (including added \bibnote{} commands and added citations). BibTeX is used to produce the bibliography with the \bibliography{filename} command in the main LaTeX file. I'm using latexdiff in the following way:

latexdiff --subtype=COLOR old.tex new.tex > diff.tex

The resulting LaTeX file does mark the new citation numbers which appear in the text, but doesn't highlight anything in the bibliography. In there a convenient way to have latexdiff mark changes in the bibliography?

13

You have to use latexdiff directly on the bbl files. So just execute

latexdiff old.bbl new.bbl > diff.bbl

and then execute (pdf)latex diff.tex. This generally works well with (author,year) style of citations, but I have not tried it with numbered styles.

For the bibnote command you probably have to use --append-textcmd option

latexdiff --append-textcmd=bibnote ...

  • 1
    Thanks, that's helpful. I was just hoping that there was a way to do this whereby the markup could be handled in the main LaTeX file so that I wouldn't have to call latexdiff multiple times. It's also a bit inconvenient to have to prevent TeXworks from recompiling the bbl file when compiling the output of latexdiff. Alas, sometimes the long way is the only way. – tarheels Apr 30 '14 at 0:35
  • I just checked and yes this works with numbered styles as well. For, example, there are not false positives when the numbers shifts. – Jason Rute Aug 24 '16 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.