University of Oxford Logo University of OxfordDepartment of Computer Science - Home
Linked in
Linked in
Follow us on twitter
On Facebook

What's the idea of this Natbib/BibTex malarky then?

BibTex and NatBib together form an almost-easy-and-useful way to include references in a Latex '.tex' file. The idea is that all of your references can be in one place, instead of stuck at the bottom of each '.tex' document. The ones you cite in the text get automatically put into a list in the bibliography. Don't ask questions about why you need two packages, this is a LaTex add-on to an add-on to an add-on and you'll have to get used to that kind of thing.

How do I use it all then?

1. Make a references file

Make a file called "summat.bib" with all of your references in what seems a bizarre format. They should generally look like this:
title={{Reciprocal Regulation via Protein-Protein Interaction between c-Myc and p21 cip1/waf1/sdi1 in DNA Replication and Transcription}},
author={Kitaura, H. and Shinshi, M. and Uchikoshi, Y. and Ono, T. and Tsurimoto, T. and Yoshikawa, H. and Iguchi-Ariga, S.M.M. and Ariga, H.},
journal={J. Biol. Chem.},

The references don't have to be in any order, but you might find it useful to keep them alphabetical in case you want to change anything. You can have entries that aren't cited in the text without any problem.

The important things to note are:

Top Tip: Use Google Scholar, click on "Scholar preferences" and scroll down to tick a box and it will then allow you to see citations in BibTex format. You can then search for a reference, click on "Import to BibTex" and copy 'n' paste it into "summat.bib". This will save you hours, it is generated automatically so you just have to check that they have included everything you need and it is in @Article format.

2. Stick these blue bits in your .tex file

\usepackage[authoryear]{natbib} % Natbib options, [numbers] would give numerical citations.
\bibpunct{(}{)}{;}{a}{,}{,} % Tells it how you want references displaying in the text.


\title{My Article}
\author{Nobody Jr.}

Bla-bla-bla said \citet{kitaura2000rrv} or \citep{kitaura2000rrv}.

\bibliography{summat} % Tells it where your list of references is.
\bibliographystyle{plainnat} % Tells it how you want references displaying in the bibliography.


"natbib.sty" file is on school unix system, but can also be downloaded from loads of places, type it into google if you need it. "plainnat.bst" is a file that tells NatBib/BibTex how to display the references in the actual Bibliography. It is annoying for a number of reasons so you may wish to use garynat.bst instead (or gary_rsi.bst for Surnames before initials), which do almost exactly what you normally want, like italics for et al. and even let you put in 'doi's. Occasionally you will be lucky and a journal will supply a '.bst' file to make references as they require.

For details of the options you can use in \bibpunct and \usepackage[options]{natbib} have a look at pages 11 and 17 of the natbib guide, the options displayed above may well do what you would normally want.

Top Tip: You can put "summat.bib" and "plainnat.bst" in a parent directory and have the .tex file in a daughter directory by putting:
Now you can use the same references list and style file for lots of different documents which are in different subfolders with associated pictures and things and not get too lost with everything in one massive folder.

3. Never, ever use \cite{} again

Always use \citet{} and \citep{} instead. \citeauthor{} is quite useful too. For details of how these work, and allsorts of other clever little things you can do please refer to page 7 of the natbib guide. As always you have to run latex, then bibtex, then latex, then bibtex, then latex, then latex for it to be happy.

4. Using it all in a thesis with clever hyperlinks

I have created a thesis template which uses all this with clever PDF hyperlinks (which only seems to work right if you do latex>dvips->ps2pdf), based upon my thesis, based upon Reuben O'Dea's thesis, based upon Simon Preston's thesis, based upon David Winterbottom's thesis template who understood how it all worked.