Can one automate the construction of a BibTeX bibliography which includes all the bibliographic entries from multiple separate LaTeX documents? The documents I have in mind have citations in common, which must only appear once in the combined list.

I could potentially paste the text from all the documents into one file and use the bibliography from that. This would involve a fair bit of editing though, since the documents all use various incompatible documents classes and macros.

3 Answers 3


Is the goal just to create a .bib file with all the unique references, or to create a single printed bibliography to tack onto the back of all these different documents? If the former (I'm making this assumption because you say that the source documents have "various incompatible classes", etc), then Bibtool and its "extraction" option is your friend. I haven't tested this, but assuming bibtool is installed, if you run latex/bibtex on each separate .tex file, so that the .aux files are generated, then I believe something like

bibtool -x file1.aux file2.aux file3.aux -o consolidated.bib

will move you toward what you want. See p10 and pp27-28 of the bibtool manual. Even if the goal is a single printed bibliography, however, it will be straightforward to produce one once you've created the consolidated .bib file.


You can create a new document and then copy the contents of the *.bbl files of the other documents into this new document. Then delete all \begin{thebibliography} and \end{thebibliography}, except of the very first and last one.

  • Does this not leave duplicates in the combined list? Commented Feb 13, 2011 at 23:19
  • yes, that's true
    – user2478
    Commented Feb 14, 2011 at 7:57

I think it might be sufficient to move all the \bibcites from the auxfiles into one auxfile. (Along with an initial \bibstyle command. Best take one from your existing documents' auxfile.) Running bibtex on that file should give you a bbl which contains the formatted bibliography. (But it's late here, I might be wrong.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .