## 12 Citations and Bibliographies

### 12.1 Other People's Work

In many of the documents you'll be producing you will at some point want to cite other documents. In this case you need the \cite{} command. You also need to define your citations of course; there are several ways to do this, but probably the best is using an auxiliary program called bibtex.

To use bibtex you create a .bib file which contains one entry for each of the works you wish to cite. BibTeX is not the same as LaTeX, and a .bib file is not a LaTeX file and has its own syntax. A .bib file consists of a series of entries, each one referencing a published work of one kind or another. The entries look like this:
 

@PhdThesis{hasnip,
author = 	 {P. Hasnip},
title = 	 {Ab-initio Simulations of Transition Metal Surfaces},
school = 	 {University of Cambridge},
year = 	 {2001},
OPTkey = 	 {},
OPTtype = 	 {},
OPTmonth = 	 {},
note = 	 {Chapter 6},
OPTannote = 	 {}
}

 

The @ defines the start of an entry, and the text following it defines what kind of work it is. Common sources are PhdThesis, Article (for papers), InCollection (e.g. for papers in those Springer-Verlag books or conference proceedings) and Misc for anything that doesn't fit in the others (private communications, for example).

Once you've defined what the source is, everything else goes in between curly braces as shown in the example. The first bit is a unique identifier that is how you're going to refer to this work in your LaTeX document - you'll give this to the LaTeX \cite command, just like you use with \label and \ref.

After the document type and unique string there are a number of bits of data that may or may not be relevant, and different types of work have slightly different allowed data. If you don't want a particular bit, just put OPT in front of it, as I have for address in the example above.

Once you've finished your bib file you can cite any of those worrks in your LaTeX document just using \cite{}, e.g. \cite{hasnip}.

You will need to tell LaTeX you want to include a bibliography, and you do this by adding the command \bibliography{thesis} where you want it to appear in the LaTeX document, where thesis here is the prefix of your bib file. You probably also want to make sure it is included in any table of contents, which you do with \addcontentsline{toc}{chapter}{\sc Bibliography}. E.g.,
 

\documentclass[11pt,final]{book}

\title{My Sample \LaTeX Document}
\author{Phil Hasnip}
\date{\today}

\begin{document}

\maketitle

\tableofcontents

\chapter{Introduction}
In our previous work\cite{hasnip} we showed how to compute the
electronic properties of transition metal surfaces.

% Blah blah blah

%
% Bibliography

 
You now run LaTeX as usual, but you will then need to run bibtex to define the right references, and finally run LaTeX again to put the references in the right places! It's a bit fiddly, but it ends up looking very nice indeed.
You can set the style of the bibliography by using the \bibliographystyle{my_bib_style}, where my_bib_style is the prefix for the bibliography style file my_bib_style.bst you want to use.