6

Q: how do I create a stripped-down bibtex file based on the citations used in a given paper?

I have a single, master bibtex file that contains thousands of entries. For most papers, I only ever use a few dozen of those entries.

When I submit the final version of a paper to a journal for publication, I need to give them a bibtex file as well. Rather than give them my behemoth bibtex file, I would prefer to give them a stripped down version that only includes the entries I used in the paper.

How would I automate the process of creating the stripped-down bibtex file from the master file?

(I'm using AUCTeX, and would prefer not to get org-mode involved in the process if possible.)

6

reftex has the command reftex-create-bibtex-file that you can call via the menu Ref -> Global Actions -> Create BibTeX File.

I cite the help of reftex-create-bibtex-file here:

Create a new BibTeX database BIBFILE with all entries referenced in document. The command prompts for a filename and writes the collected entries to that file. Only entries referenced in the current document with any \cite-like macros are used. The sequence in the new file is the same as it was in the old database.

Entries referenced from other entries must appear after all referencing entries.

You can define strings to be used as header or footer for the created files in the variables ‘reftex-create-bibtex-header’ or ‘reftex-create-bibtex-footer’ respectively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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