Featured Post

We've moved to tex.my!

It’s been great writing on Blogger.com, but we’ve decided to move to a new platform, thanks to some valuable help from a great, great friend...

Tuesday, January 22, 2013

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!