2014
11.09

It is sometimes useful to extract only the relevant bibtex entries from your bibliography file – for example, if you are using a big bib file as default, such as geombib (which is now outdated). There are two solutions I am aware of:

  1. Using bibtool, you can do (from the command line):

    bibtool --pass.comments=on --print.line.length=140 -x paper.aux -o test.bib

    This works very well, and extracts all the relevant bibtex entries, macros, and even (relevant) preamble macros/commands.

  2. Emacs has a minor mode called bib-cite-minor-mode. Once activated you can issue the command bib-make-bibliography, which creates a buffer with all the relevant entries. Works reasonably well, but does handle preamble macros correctly like bibtool. Still pretty useful.
    As pointed out by Marcus (see comment), there is also reftex-create-bibtex-file which also works (with similar limitations).
  1. Another option is to use “reftex-create-bibtex-file” in reftex-mode.
https://sarielhp.org/blog/?p=8667
sarielhp.org
crawl=CC-MAIN-2021-43
31610
application/http; msgtype=response
sha1:ZWTU64FACDIOQMFES5TQPMPH2T6XCUWN
<urn:uuid:1fbf232d-4f6e-4f7d-beda-4bd6672bbef3>
2021-10-26T17:28:57Z
128.174.246.143
application/xhtml+xml
sha1:5PGAGXBPAFG4YQ75VEFCQUWV5FBZRJUX
<urn:uuid:0fb2eb77-2e07-411f-a2d9-e72f7b8d60c0>
https://sarielhp.org/blog/?p=8667
response
<urn:uuid:1a76a663-0ce5-4f5b-8f03-50480d91d1ac>
isPartOf: CC-MAIN-2021-43
publisher: Common Crawl
description: Wide crawl of the web for October 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-149
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/