Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How does one identify the unique bibliographic entries in a pair of substantially overlapping bibtex bibliography files?

For instance, suppose bib file a.bib has the following entries:

    @article{red
            ...}
    @article{blue
            ...}
    @article{green
            ...}

And bib file b.bib has the following entries

    @article{green
            ...}
    @article{red
            ...}
    @article{yellow
            ...}

How might I quickly extract bib entries blue (unique to a.bib) and yellow (unique to b.bib)?

share|improve this question
    
An interesting question. Just to clarify, aren't these the citation keys rather than specific entries? I.e. there's a possibility that green in a.bib is not the same as green in b.bib. I have a similar problem, in that the entries may be the same in two files, but the keys could well be different, which is why I ask this question about the citation keys. Checking that two entries are the same seems to involve a bit more complexity. –  Iterator Jun 24 '12 at 21:26

1 Answer 1

There are probably any number of tools that can perform this task.

One of the better-known BibTeX toolkits for users of Unix platforms is Nelson Beebe's set of "BibTeX bibliography tools" -- see http://www.math.utah.edu/~beebe/software/bibtex-bibliography-tools.html. Among these is a tool called "bibjoin", which is probably (very close) to what you're looking for. The converse of merging two bib files (i.e., taking their (nonoverlapping) union is to find the parts of a.bib and b.bib that aren't in the intersection of the two sets.

Another such tool is "Bibi, the BibTeX Manager" available at http://bibi.sourceforge.net/. Among its advertised features is "Merge two bib files".

For MacOSX users, "BibDesk" -- see http://bibdesk.sourceforge.net/ for more details -- may be of special interest for the task at hand.

share|improve this answer
    
JabRef also features a 'Find duplicates' function –  Joseph Wright Jan 11 '12 at 8:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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