This is just a quick guide to getting BibTeX to work in a LaTeX document. This is not meant to be an introduction to BibTeX for someone who’s never heard of it, but rather a cheat-sheet for those of us who don’t use it quite often enough to remember the details without a little help.

First you need to create and manage your bibliography database (.bib file). You could do this by hand, but if you’re on OS X I’d highly recommend BibDesk. Much simpler.

Secondly, you insert citations in the document using the \cite{} command. Each entry in your bibliography database has a separate citation key, you use this key to insert a reference. For example, if my bibliography database contained a reference with a citation key ‘Busschots2008’ I’d insert a citation to that reference with the command:

\cite{Busschots2008}

Thirdly, you need to include your bibliography in your document. To do this you need to set a style for it, and then include it. If you’re not sure what style to use start with plain. Assuming your bibliography database is in a file called Sample.bib, you’d include it with the following code (notice that you don’t add .bib to the end of the file name):

\bibliographystyle{plain}
\bibliography{Sample}

Finally, to render the document you now need to run your document through both BibTex and LaTeX in the following order:

  1. latex
  2. bibtex
  3. latex
  4. latex

Tagged with: