Extracting Only Cited Bibliography Entries

Occasionally, while exchanging files with collaborators or submitting articles, I’d like to extract a smaller .bib file from my main, “hold-all” bibliography file, i.e. containing only the entries that I’d actually cited in my document.

Fortunately this can be done fairly automatically using the bibexport tool. Quick rundown:

  1. Compile your document, say myarticle.tex the usual way, with your “big” allrefs.bib file.
  2. Run bibexport with the following:
    bibexport -o extracted.bib myarticle

    extracted.bib should now contain only the bibliography entries that were cited in myarticle.tex.

  3. Change \bibliography{allrefs.bib} to \bibliography{extracted.bib} in myarticle.tex.
  4. Send myarticle.tex and extracted.bib to collaborator or editor!

Leave a Reply

Your email address will not be published. Required fields are marked *