[Tex/LaTex] Merge two BibTeX files

bibliographiesbibtex

I was constructing a BibTeX file for my Thesis. At the middle of that I had copied that bib file to another document I had to produce, I had to add some new citations to the copy of the original.

Now I have 2 bib files that have a lot in common but differ in some citations. Is there a way to merge them? So that I have one single file with all the citations from both files but no duplicates?

Best Answer

bibtool -s bibliography1.bib bibliography2.bib will merge two bib files, keeping duplicate entries. bibtool -s -d bibliography1.bib bibliography2.bib will merge two bib files, commenting out one of the duplicated entries (not sure which one). For more info, see documentation.

Bibtool is on CTAN. Not to be confused with bibtools which is also on CTAN and probably also has the capacity to do this sort of thing...

Bibtool can also be found in Ubuntu repositories. (I wasn't able to compile the one from CTAN)

Related Question