Thursday, December 13, 2018

QuickTip: Extract Bibliography File from Cited References

Suppose you have a couple of big BiBTeX databases that you import into a document myDoc.tex, either as,

\addbibresource{database1.bib}
\addbibresource{database2.bib}


or,

\bibliography{database1,database2}.

Suppose the databases contain 1000s of records, while your document contains only a few tens. If you want to extract a new ".bib" file only from the references cited in the paper, then you can use the bibexport tool that comes with the TeXLive distribution.

bibexport -o extracted.bib myDoc.aux

This produces a new bibliography file extracted.bib, which contains only those records used in myDoc.tex.

No comments: