BibTeX, biblatex and biberCreating .bib-files of works cited in a document?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
venable
Posts: 5
Joined: Sat Aug 15, 2009 10:05 pm

Creating .bib-files of works cited in a document?

Post by venable »

Hi LaTeX Community,

I would like to know if it is possible to generate a bib-file containing only those entries you have cited in your .tex file.

That is, supppose I am working on a document called funtimes.tex, using my master bib-file master.bib. Is there an automated way to create a file funtimes.bib, which is a subset of master.bib, containing only those entries cited in funtimes.tex?

The reason I ask is that it seems this would be useful for collaboration - instead of exchanging massive bib-files with lots of repeated entries, collaborators could just share a simple bib-file containing only the relevant entries. However, if there is a better way to manage bib-files in collaborative work, I would love to hear about that as well.

In case it is relevant, I write in LyX 1.6.3, which in turn calls on MikTeX 2.7, and use JabRef 2.5 to manage my bib files. All this is in Windows XP.

I apologize if this is obvious or has been covered before. I performed a search of this discussion group using the keywords that seemed fitting, but perhaps I missed something.

Many thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Creating .bib-files of works cited in a document?

Post by josephwright »

JabRef can read an aux file and extract the relevant .bib entries into a new file. Tools -> New database based on aux file
Joseph Wright
venable
Posts: 5
Joined: Sat Aug 15, 2009 10:05 pm

Re: Creating .bib-files of works cited in a document?

Post by venable »

THank you Joseph, that works very well.

As an aside (for others who may find this thread in the future), unfortunately it is less than straightforward to create an aux file in LyX, at least in its present form. Since LyX uses MikTeX, there must be an aux file created somewhere, but whether it is kept or where is not apparent.

However, there is a workaround:

In LyX, export a plain LaTeX file.

Then go to the command line prompt (Run - "cmd"), use cd commands to move to the directory where your .tex file has been created, then compile the tex-file directly using MikTeX. At the command line, type "latex yourfilenamehere.tex". This will generate the aux file you need.

If there are any adept LyXers reading this, it would be a nice contribution to add this as a macro or module. Unfortunately this is well beyond my abilities.
Post Reply