# Recommended citation key construction

I am starting a PhD, so reading papers and writing notes about them will be my routine for some months. I like to be organized so I try to add the interesting publications to a bib file. However, when writing my master dissertation, I didn't know how to organize my citation keys. I had some keys like paper:smith03, others like master:goodwin97a and even paper:john2008adaptivealg.

I initially thought that type:first lastname:year was a good start but it then got a little out of control when I added authors that had the same last name or when the same author published many papers in the same year. I then tought about type:first lastname:year:first couple of words of publication, but it seemed to long, over-explained like the Hungarian notation of a variable (my initial approach was already a bit Hungarian-ish)

My question is: do you have any tips or good citation keys for bibtex entries?

-
As this is subjective, why not making it community wiki? –  Martin Tapankov Oct 12 '10 at 12:58
Ok @mindcorrosive, I hesitated at first... –  YuppieNetworking Oct 12 '10 at 13:02
This kind of question becomes moot if you use a system that allows you to search your bibliography and input the relevant key automatically (like emacs+reftex does). –  Seamus Oct 12 '10 at 15:03

I keep all my references in a simple scheme, like {authorYear}, e.g. smith00 (no need for full year -- in my field all the interesting work starts from 1960s). If necessary, I add a suffix "-2", "-3", etc. when multiple papers are available from the same author in a given year. With short and common names (such as those of people of East Asian origin), I usually add the second author's name as well, e.g. leejung08 (Lee and Jung, 2008)

The main good thing is that most references are short and easy enough and I can remember them exactly after a few repetitions without consulting the bibliography database.

I never had problems with keeping up, even though my bibliography database contains 200 or so entries. With a good bibliography manager, I never spend more than a few seconds finding whatever reference I need, especially when you're able to navigate quickly through it to the electronic resource (PDF, web link, DOI).

Paper organization tip: I mark all my printed papers with the same key as the BibTeX keys, and when kept at alphabetical order, you can easily find the one you need.

Update: Rename all your electronic publications (you do keep them offline, don't you?) using the BibteX key as a filename (nothing worse having a directory full of files with names that look like Perl code). (Hat tip to @Seamus for the reminder).

-
Another tip related to the last point, is start the names of your pdfs with the related bibtex key. This means that checking a fact or a quote is simply a matter of doing a google desktop search for the key... –  Seamus Oct 13 '10 at 12:33
Oh yes, I do that too -- forgot to mention it. –  Martin Tapankov Oct 13 '10 at 12:46

If you're generating your own keys, I suggest <name>:<title> where both fields are shortened/abbreviated. For instance, a paper by Atiyah and Bott called "The Moment Map and Equivariant Cohomology" could be keyed as A-B:moment-map. Who cares what year it was published? Not you; that's for people who want to look it up, and that's what the bibliography is for. I don't think a catch-all system is as important as being able to remember the key when you type it.

But you might also leave the key generation to somebody or something else. MathSciNet (I can only speak from the math world) allows you to export records as BibTeX, and generates keys for you. If you're using a Mac, use BibDesk to manage your bibliography. It can import records from many sources and generates keys as well. Then you can copy citations from BibDesk into your LaTeX window. The keys are ugly but you just search and copy.

I appreciate the desire for a system and for consistency; I've suffered from it often. But don't let a system get in the way of the task of actually reading those papers you're citing. :-)

-
+1 for "But don't let a system get in the way of the task of actually reading those papers you're citing." –  Martin Tapankov Oct 12 '10 at 14:28

Back in the days when I kept my bibtex references in a single .bib file, I used a very simple system. I took the initials of the author(s), put them in alphabetical order (by surname) and then added a number to make it unique. To avoid confusing myself, I only added numbers on the second reference by that author, and then started at 2. So I had 'jm', 'jm2', 'jm3', and so forth (up to about 'jm9' at least since there's both John Milnor and Jack Morava!).

Of course I couldn't remember all of these, nor could I remember what I was up to, and it was too much of a hassle to work out the initials each time, so I had a script to do it for me that would import an entry, generate the key, and search through existing ones when I asked it.

Now I use a slightly more sophisticated system that can slurp in records off the web (MathSciNet and arXiv, primarily, as I'm a mathematician). I can't recall what format the citation keys are in, because I don't really care - citation keys are only for the computer to link the \ref to the bibliographic information.

In short, my advice is:

1. Don't worry about a system, you'll never remember exactly what is the key for a particular paper except for the 4 or 5 papers you cite all the time and you'll remember the keys for them whatever they are.

2. Do worry about organising your references. Get a database installed that you like and which doesn't irritate you. I recommend refbase, but tastes vary. I also recommend getting one that can store copies of the documents, or at the very least link to them. After all, was it Atiyah-Singer I or Atiyah-Singer II or Atiyah-Segal that contained the actual result you want to cite?

-
I second point 1. –  Willie Wong Oct 12 '10 at 15:46

Not the question you asked, but, for ease of organization, I would personally suggest using a reference manager. I am biased toward JabRef, but I've also heard good things about Zotero and Mendeley.

With JabRef, I save all my citation keys just the publication year tacked onto a 6-letter abbreviation for lastnames of the authors, as evenly divided as possible. (So 1 author is the first six letters, 2 authors is the first three of each of the author [if one of the individuals only has a two letter lastname, the key will be shorter], 3 authors is the first two of each, 4 and more is the first letter of the first 6 authors.) Same author/year combination I will just tack letters a,b,c,etc onto the key. So the third publication by A.Scientist in the year 1969 will be Scient1969b.

I've only started using JabRef a year ago, and my bib database has grown to close to 300 entries now. It is much easier to manage than what I have before.

That said, my previous flat-file based bibliographic database has several directories (each for a category of mathematics roughly corresponding to the arXiv tags), each directory contains several files (sub-specifications). So an entry on nonlinear wave equations will be under the directory mathAP in the file NLW. And I had a bash/sed script which read all the files, collected all the entries into a master bibtex file, where the keys to each entry is prepended with [directory]:[filename]: The key itself in the files were the author lastnames plus year. So the final key looked like

category:subcategrory:author:year


and was extremely unwieldy. (So then I wrote a vim plug-in to search my bibTex file...)

Like I said, it was ugly, and while it worked, I let the implementation of that system sap way too much time out of actual research. So take it as a cautionary tale.

-

I think that Zotero and Mendeley are the way; they have BibTeX-oriented features that make the integration with your LaTeX system almost seamless. Personally, I'm in love with Mendeley.

Practically speaking, I'd remember the content of a paper, rather than its citation key. Mendeley helps you to find the paper you are interested and is very helpful in:

• importing the reference with several tool (the web importer is the best one)
• organizing the reference with tags and collections
• creating a unique citation key for each reference
• automatically creating the .bib file you need (you may also opt for a bib file for every collection you create

So, you only have to tell LaTeX where your bibtex file is, and you're done!

-

I can't tell you how to organize your office, but I can give you the layout of my own desk:

1. If a paper has one author, then the key is:

< 1st four letters of author's last name>:<1st four letters of first important word in title>:

Example:

"Slice Sampling" by Radford Neal, published in 2003

would be labeled:

Neal:slic:2003

2. If a paper has two authors then include the first four letters of the second author's name as well. (Authors have a tendency to publish on the same topics and I find this helps to group similar articles.) For example:

"Examples of Adaptive MCMC" by G.O. Roberts and J.S. Rosenthal in 2009

would be labeled:

3. If a paper has more than three authors, then I include "etal" instead of the second author's last name, for Example

"Bayesian Selection of Continuous-Time Markov Chain Evolutionary Models" by Marc A. Suchard, Robert E. Weiss and Janet S. Sinsheimer published in 2001

would be labeled:

Such:etal:CTMCeM:2001

I also included the last one because sometimes I find that a single word doesn't help me remember the paper. Sometimes I'll use a whole word if two abbreviations collide (para -> parallel, parallax, etc.)

But Most Important: I use a program which is able to search the titles and abstracts efficiently and provide me with the key (Not just emacs + grep). I use jabref.

-
emacs+reftex allows you to search your .bib file, which effectively searches for titles of papers. It then automatically puts the right key in. (C-[ for the default bindings) I don't understand how jabref is more efficient. –  Seamus Oct 13 '10 at 12:30
In search, probably not -- perhaps I misspoke a bit, but jabref is able to track down articles via the web, download abstracts, and further, something I find really useful, it is able to store a soft link to the file. I've got pdfs in a bunch of folders organized as best I can, but I find it nice that I can open a program, search keywords, and then click the link and it opens the pdf. Further, since it's written in java, it runs the same on Windows, Linux, and Mac OS X. –  M. Tibbits Oct 13 '10 at 12:33