There are three steps to effective bibliography management:
I’ll describe each step in detail below.
All your bibliography information will be stored in a structured file with a .bib extension. When you compile your document, LaTeX will look at that file, pull the right references, and stick all and only the right references in your works cited.
Sounds easy enough: stick all your bibliography information in one file, cite your references as you go, and let the computer sort out the bibliography. And it is (basically) that easy. I include the parenthetical because a .bib file is a highly structured file, and if you don’t have the right tools, creating one is a bit of a hassle.
As an example, here is my entry for Lewis’s On the Plurality of Worlds:
@book{LewisOPW,
Address = {Oxford},
Author = {David Lewis},
Date-Added = {2009-10-13 11:33:52 -0400},
Date-Modified = {2009-10-13 11:33:52 -0400},
Publisher = {Basil Blackwell},
Read = {Yes},
Title = {On the Plurality of Worlds},
Year = {1986}}
For the most part, it is clear what each line of this file is doing. The first says we are talking about a book, not an article, and then it assigns a little code to the book. My code is the author’s last name and then the first letters of each word in the title (or a memorable combination of some of those letters). This is the cite key for this reference. It is very important. It must be unique to the reference in question. I’ll come back to cite keys in the next section.
The rest of the lines indicate where the book was published, who the author is, when I added this file to my bibliography, the book publisher, whether I’ve read the work, the title of the book, and the year it was published. Like I said, pretty straightforward. But can you imagine putting every reference from your dissertation, a book, or even a single paper in that format? It seems miserable.
But there is a better way. If you have a Mac, when you downloaded MacTeX, you downloaded a program called BibDesk. BibDesk is going to solve all your problems. (If you have a PC, you are only a little less lucky. JabRef is the Windows counterpart to BibDesk. I’ve never used JabRef, but I’m guessing it is fairly similar to BibDesk.) BibDesk gives you a very nice graphical user interface for creating a .bib file.
BibDesk is straightforward, so I won’t say too much about it. When you click to create a new reference, you get a nice window like this:

All you have to do is pick a unique cite key for the work, then fill in the publication information, and BibDesk will format the BibTeX file for you. (Notice the little area over on the right: if you drag a pdf file of a paper here, then when you do a search in your bibliography, BibDesk will search within the article. And if you happen to take notes on the pdf using Skim, BibDesk will search those, too.)
You must create your bibliography file in the right location. If you don’t it can’t be found when you compile your document, and that defeats the purpose. There are two locations you can use. You could put your .bib file in the folder that houses your .tex file. BibTeX (the compiler you run to turn cite keys in your .tex file into the format LaTeX needs to compile them) can find them that way. But if you do this, you obviously cannot use one big bibliography for all your papers (unless you keep everything in one folder). Alternatively, you could create a duplicate .bib file for every paper you write, but these would be difficult to keep synchronized.
There is a better option. To use it, you need to create a new folder. (This applies to Macs only. I don’t know where you should put your bibliography if you use a PC. Sorry.) If you open up the Finder, it will likely come up to your main user folder. That should bear your user name as its name. (Mine is charlietanksley.) This folder contains a Documents folder, a Downloads folder, a Music folder, etc. You want to open the Library folder. Create a folder in that folder called texmf. In the texmf folder, create a pair of folders: one called bibtex and one called tex. We’ll set the tex folder aside for now. In the bibtex folder, create another pair of folders: one called bib and one called bst. Put your bibliography in the bib folder. My bibliography can be found at the following location: charlietanksley/Library/texmf/bibtex/bib/mybib.bib. You should put yours at the same location modulo a pair of changes: your user name should replace my user name, and the name of your bibliography should stand in for mybib.bib.
If you put your bibliography here, TeXShop knows where to look in the compilation process. It also knows where to look to help you insert references into your document. And that, as we’ll see, is a very big help.
You need to get references into your paper. You do this by calling the proper command with the proper argument. Recall, if you want to make some text bold face, you put it in the scope of a \textbf{} command. Similarly, if you want to cite a reference, you put it in the scope of the proper \cite{} command. But you don’t put the entire reference between those curly braces: you only need to put the cite key for the reference. Since each reference has a unique cite key, if you put the cite key in a \cite{} command, BibTeX can put the right reference in when you compile the document.
There are two important components of creating a citation:
I’ll deal with each in turn.
I am pretty sure that LaTeX has some default citation resources built in. But I don’t think they are that good. And it is easy to have exactly the commands you want. So I’ll explain how to do that.
To generate the various references we philosophers need, you will want to use the natbib package. The package is rather well documented, so if you need more information, you should certainly check that out. (You can find documentation for any package in TeXShop by searching for it by name if you click on Help in the menu bar and then Show help for package. But you can find the natbib documentation here.)
There are three distinct elements involved in using the natbib package: invoking the package in your prologue, citing sources, and controlling the look of the final bibliography section.
Calling natbib is quite easy. All you need to do is put the \usepackage{natbib} command somewhere in your prologue (i.e., somewhere between \documentclass{article} and \begin{document}). This will tell LaTeX to process your citations using the natbib style and will tell LaTeX how to make sense of your various citation commands.
While we are in the prologue, I recommend using one more command. I like to use the \setcitestyle{aysep={}} command right after the \usepacakge{natbib} command in the prologue. This makes it the case that author and year are separated with a blank space rather than a comma. So I would get Lewis 1986 instead of Lewis, 1986.
So, to sum up, I put this in the prologue:
\usepackage{natbib}
\setcitestyle{aysep={}}
And that takes care of calling the natbib package.
Not all citations are alike. Sometimes you need a page number, sometimes you don’t. Sometimes the citation is a parenthetical, sometimes it is part of the subject of the sentence. Sometimes you need the author and year, sometimes you just need the year.
Since there are multiple styles of citations you might need, there are multiple citation commands.
Here is a chart that includes the commands I use most commonly (on the right) and their output (on the left). Recall that ‘LewisOPW’ is my cite key for On the Plurality of Worlds.
Output: Command:
(Lewis 1986) `\citep{LewisOPW}`
Lewis (1986) `\citet{LewisOPW}`
(1986) `\citeyearpar{LewisOPW}`
There are other commands, but these are the ones I use most often. (I don’t aim to be comprehensive here. See pages 7, 8, and 9 of the natbib documentation for extensive and clear tables of all your options.)
I think you can do almost everything you want with these commands. Two things you might want to do: add specific page numbers and cite multiple papers. These are easy additions.
To add page numbers, simply insert the page number or numbers in square brackets ([ ]) between the cite command and the cite key. So this command \citep[202--203]{LewisOPW} would produce ‘(Lewis 1986, 202—203)’ (note the double hyphen between the page numbers; you need this to get LaTeX to use the right dash for a range of numbers).
To add a comment before the citation, put that in another set of square brackets before the page number set. To get ‘(see Lewis 1986, 202)’ you would write \citep[see][202]{LewisOPW}. And if you want the ‘see’ but not the page number, you would write \citep[see][]{LewisOPW}. (Since page numbers are more common than ‘see’s, LaTeX assumes a single argument in square brackets is a page number. So if you want text before the citation but no page number, you need the empty square brackets.)
To cite multiple sources in one location, simply separate the cite keys with a comma. So \citep{LewisNWTU,OPW} will produce ‘(Lewis 1983, 1986)’. And if you cite multiple papers by one author in a year, LaTeX will stick the ‘a’ on the first one, a ‘b’ on the second, etc.
One nice feature of using explicit citation commands is that it lets LaTeX automate the creation of your bibliography. If you are writing a long paper or have many sources, this is very helpful. (One of the most time-consuming and frustratingly tedious parts of writing my dissertation in a word processor was making sure every cited reference appeared in the bibliography and that every reference in the bibliography was cited. I know now that there are citation managers you can add onto most word processors, but I didn’t know that then. LaTeX builds this in.)
But since LaTeX is really geared towards scientists, the bibliography you get is not going to look like you want. Even if you use the natbib package. But you can easily customize the bibliography’s format.
First, we need to write the bibliography. All you need to do to do this is put the following command wherever you want the bibliography to appear: \bibliography{your_bibliography_file}. (Note: do not include the file extension here.) When LaTeX sees that command, it will print the bibliography. If you want the bibliography to be printed at the end of the paper, just stick that command one line above the \end{document} command.
Now, we need to customize the look of the bibliography. You do this by specifying a style via the \bibilographystyle{your_style} command. You can put this anywhere in the document you like, so long as it comes between the \begin{document} and \end{document} commands. The natbib documentation suggests you put it right after the \begin{document} command. I like to put it right above the \bibliography{your_bibliography_file} command. But it doesn’t matter where you put it.
You have two options for customizing the look of the bibliography via the \bibliographystyle{} command. The most straightforward is to use one of the styles that come with the natbib package. Both the dcu and kluwer styles are similar to a traditional philosophy bibliography. (Page 14 of the natbib documentation lists all the available options, if you want to nose around.) The other option is to use a custom style file.
You can find custom style files in various places on the internet. If you find one you like, stick it in /User/Library/texmf/bibtex/bst/. That is one of the folders we created earlier (recall, your .bib file is in /User/Library/texmf/bibtext/bib/.) I use a style file that puts my bibliography in the style favored by the Philosophical Review. To do this, all you need to do is grab a copy of the style file (the .bst for Phil Review, as he calls it) from Ted Sider’s page, stick it in the right folder (described above), and then call it from the \bibliographystyle{} command. You can find other style files around, but this one looks nice enough, so I use it.
That is it. If you use natbib, these three citation commands (plus optional arguments to include page numbers and notes), and call a style file you like with the \bibliographystyle{} command, you’ll end up with a nice, well formatted, complete bibliography with minimal work. That is a good thing.
So, to review, your paper will look something like this:
\documentclass[12pt]{article}
% the rest of the prologue
\usepackage{natbib}
\setcitestyle{aysep={}}
\begin{document}
\maketitle
% Body of your paper\
\bibliographystyle{dcu} % or \bibliographystyle{Phil_Review} or whatever
\bibliography{your_bibliography_file}
\end{document}
You need to follow a slightly different set of directions if you want to do full citations in footnotes (where, e.g., the first footnote that mentions a text includes the full citation information). I’ve written a detailed post on my blog. Since this is a slightly more advanced topic, I’m not going to discuss the details here. But you can read the details on the blog, or you can download a pdf version at www.charlietanksley.net/pdf/latex-footnote-citations.pdf.
There is one hitch in the bibliography management system described above. Instead of remembering that you want to cite Lewis’s On the Plurality of Worlds, you have to remember that you want to cite that book plus the unique cite key for the book. This isn’t so hard for the books and papers you cite all the time, but it is difficult for papers you cite infrequently. Coming up with a cite key generation system that works for you will help this a little bit. But it won’t really solve the problem. Thankfully, the people who wrote TeXShop have come up with an elegant solution to this problem. (A number of text editors have similar fixes for this problem. You can find a very similar solution for Vim and TextMate. In the near future I hope to play around on a PC and see how TeXWorks handles this issue. But for the time being, I’ll only talk about TeXShop.)
In TeXShop, to use this functionality, simply start typing your cite command, then hit the F5 key once you type the open curly bracket. (BibDesk needs to be running for this to work; but if it is not open, the most recent version of TeXShop will open it. If you have trouble getting this to work, try opening BibDesk.) You’ll get a little popup window with your bibliography in it that you can navigate with the up and down arrows. Hit when you get to the entry you want, and TeXShop will stick it in your document. If you start typing part of the name, that will narrow down the list of options. So if I type \citep{Lew and hit F5, I get the following little list:

This is, obviously, a quite handy feature. Just select your reference, hit , then type your } and you are done.
Once you have written a paper full of \citet{} commands and have called the bibliography in a style you like, you need to compile your paper correctly. If you just compile it using LaTeX, you will not get a bibliography. You will get a question mark everywhere you wanted a citation, and you will get a blank section called ‘References’ at the end of the document.
To get your bibliography and citations to print, you need to compile your document in multiple steps. First, compile it using LaTeX. This creates a list of the cite keys you used (I think that is what it does.) Then, compile it using BibTeX (you’ll find this in the same menu as the ‘compile with LaTeX’ feature). This generates a file with the relevant bibliographic information. Now compile your document with LaTeX again. This is the step where LaTeX is told what each cite key corresponds to, and it isn’t until this step that you get question marks replaced with citations. I think that should do it. But I always compile with LaTeX one more time just to be sure all the details get ironed out.
So when you are ready to get a pdf file, you will
Then you are done. You have your first full paper.
Though I think a big selling point of LaTeX is the fact that you can produce beautifully typeset documents with a minimum of effort, I’d be lying if I said I just use the basic article document class with no adornments. You can while away many an afternoon getting your papers to look exactly like you want. You can argue about whether this is time wasted. But if you are interested in tweaking your document in this way, read on to find out about a few packages and options to alter the look of your document.