Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My work involves producing various documents with citations (e.g., journal articles, conference presentations, reports, etc.). Publications cite references, and references can be specific to a given publication, or to a set of publications built around a study, or a set of studies, or a research program. A reference may even cross-over into multiple research programs.

I'm a big fan of the DRY Principle (i.e., Don't Repeat Yourself). However, I'm also a big fan of making projects portable.

Satisfying both principles seemingly leads to a conflict in relation to bibtex files.

  • Is it a good strategy to have a single master bibtex file for all projects and adopt some automated copying system whereby each publication gets a copy of the overall bibtex file (or a subset)?
  • Or is it better just to have lots of little publication specific bibtex files?
  • Or is there some other system that people find works best?
  • What tools can assist?
share|improve this question
1  
ctan.org/pkg/bibtools –  Seamus Dec 2 '10 at 13:35
    
as pointed out below by Charles Stewart, this question overlaps with tex.stackexchange.com/questions/1380/… –  Jeromy Anglim Dec 3 '10 at 9:43
    
add comment

8 Answers 8

up vote 16 down vote accepted

I just keep everything in one big BibTeX database and use the search function in JabRef.

If I really need to give away a subset of the references to a co-worker (and don't want to send the whole file), I generate a new, smaller .bib-File using the "New subdatabase based on AUX file" from the Tools menu in JabRef.

But ultimately, you'll just adopt a system that works best for you. Mendeley has been suggested, I've also heard good things about CiteUlike.

share|improve this answer
3  
Same here. BibDesk for Mac OS X (which I use) also has a "Select Publications from .aux File" feature. –  Will Robertson Dec 2 '10 at 10:56
    
Thanks. I'm a big fan of JabRef. And it's good to know that others work this way. I'm leaning towards automating the process of reference extraction, perhaps as mentioned in a separate answer using something like the bibexport script –  Jeromy Anglim Dec 2 '10 at 11:49
    
BibDesk is a great piece of software. Unfortunatly I must use Windows at work, where all the reference-TeXing happens. At home on my Mac I mostly just write letters... –  Habi Dec 7 '10 at 15:57
    
++1 for JabRef! –  PHPst Sep 3 '13 at 16:47
add comment

I have one master BibTeX file, which is versioned by itself in a Git repository. When writing a paper (each is also versioned as a separate Git repository), I include the master .bib file as a Git submodule. It puts the master .bib file as a subdirectory of my paper 'project'.

This way I have one copy of my bibliography, and my projects are portable as requested in the question.

Furthermore, Git submodule points to a specific version of the master BibTeX file. Therefore my paper always uses the original .bib file state, even if I have updated it in the master repository since (e.g. even changed reference keys). Similarly I could have paper-specific changes to the master file via branching.

The approach would also work with multiple authors/bibliographies - just include multiple submodules.

This is the general idea. To spare an overlong answer here, my blog has more details of the solution with sample repository structure to illustrate.

share|improve this answer
    
This seems like a very nice idea. However, sooner then later one will run into problems when trying to implement this when having coauthors. See the discussion following the linked post. –  Dror Apr 8 '13 at 19:18
add comment

I use Mendeley to store and organize my articles, then use separate internal libraries for each project. Each library can then be exported to a bibtex file. It also has the added benefit of a shortcut (CTRL-K to get a latex entry copied to the clipboard).

share|improve this answer
    
I think you meant clipboard instead of keyboard :) I've raised an edit proposal (I can't edit directly yet). –  Kit Feb 17 '11 at 8:56
    
FYI Mendeley does not do biblatex. –  drozzy Jun 30 '12 at 20:43
add comment

Nbibtex. See my answer to the how to avoid bibtex error message “repeated entry” for an entry appearing in several bibtex files? question.

share|improve this answer
add comment

Is it a good strategy to have a single master bibtex file for all projects and adopt some automated copying system whereby each publication gets a copy of the overall bibtex file (or a subset)? Or is it better just to have lots of little publication specific bibtex files?

When I start a new draft, I use a script to create a template that includes all my bibtex files, to which I link using symmetric links. I can see the advantage of having one large bib file, but the downside for me is that I'll probably spend a lot of time looking for the right reference in that file, whereas small, topic-based files allow me to work quicker.

What tools can assist?

Mendeley not only allows you to organise, tag, ... your papers, but also to create collections and synchronize whole, exported .bib files with them. I believe this could be helpful to you.

share|improve this answer
add comment

I used to use a single master bibfile (using aux2bib from bibtools to make subsets if needed). The trouble is that I now write papers together with other people, and we don't share a master bibfile (or even a common format for bibtex keys).

So I currently have lots of papers in different Subversion repositories, each with its own set of bibfiles. One thing that helps is a script I wrote for grepping all the bibfiles and finding the distinct entries. So when I need a new entry for a project, I can see if I already have it somewhere else.

This is certainly suboptimal. Maybe Mendeley is the solution but I haven't tried it.

share|improve this answer
add comment

A reasonable approach would be to have some central database system and export work-specific .bib files for each article, report etc. Ideally, this system would allow to save work-specific literature selections (to be able to modify and re-export them easily when the tex document evolves).

Until now I did not find such a system.

share|improve this answer
    
Problem is, that once you branch from the central file the new bib file gets life of it own, and it may evolve independently from the central file. One related problem I can think of, is how to merge back the branched files? –  Dror Jan 4 '13 at 9:34
add comment

While JabRef allows for exporting references from a bib file based on an aux file, I like to have an automated build based on a makefile.

Following on from Habi's response, I did a little Googling and found bibexport. It seems well suited to maintaining a centralised bib file, and automating the extraction of references based on citations in a document.

Update: I'm quickly discovering there are many tools for automating the above process.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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