Stuart Robinson -- Creating a Bibliography in LaTeX

Creating a Bibliography in LaTeX

This page will explain the basics of creating a bibliography for a document written in LaTeX. It assumes that you are working in a Unix environment (e.g., Linux, BSD, etc.).

The Basics

  1. Create a BibTeX file with all of your references.
  2. Cite one of the references in your BibTeX file in your LaTeX document, using \cite{}, \citep{}, or \nocite{}: e.g., \cite{firchow:1969}.
  3. Create a bibliography at the end with \bibliography{} and \bibliographystyle{}
  4. Run your document through latex.
  5. Run your document through bibtex.
  6. Run your document through latex again.

Do It Yourself

The easiest way to run through the process is to download these files into a single directory: your document (bibtex_ex.tex), the bibliography (references.bib), the stylesheet (linquiry2.bst), and a bibliography package (natbib.sty) and run the following commands:
  1. latex bibtex_ex
  2. bibtex bibtex_ex
  3. latex bibtex_ex

Alternatively, you can use this shell script (texify.sh) to run all of these commands in sequence. Its syntax is

texify.sh 〈FILE〉

Note that the filename should exclude the .tex suffix. In other words, it would be

texify.sh bibtex_ex

and NOT

texify.sh bibtex_ex.tex

Running those 3 commands on bibtex_ex.tex will generate bibtex_ex.dvi, which can either be viwed/printed or converted to another format (e.g., Postscript/PDF) for viewing/printing. (Remember, texify.sh will automatically convert your .dvi file to .ps.

For sanity-checking, the output of the 3 above-listed commands looks something like this:

$ latex bibtex_ex
This is TeX, Version 3.14159 (Web2C 7.3.7)
(./bibtex_ex.tex
LaTeX2e <2001/06/01>
Babel  and hyphenation patterns for american, french, german,
ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/natbib/natbib.sty)
No file bibtex_ex.aux.
No file bibtex_ex.toc.
[1]

Package natbib Warning: Citation `firchow:1969' on page 2 undefined on
input li
ne 33.


Package natbib Warning: Citation `maddieson:1984' on page 2 undefined
on input
line 35.

[2]
No file bibtex_ex.bbl.

Package natbib Warning: There were undefined citations.

(./bibtex_ex.aux) )
Output written on bibtex_ex.dvi (2 pages, 984 bytes).
Transcript written on bibtex_ex.log.
$ bibtex bibtex_ex
This is BibTeX, Version 0.99c (Web2C 7.3.7)
The top-level auxiliary file: bibtex_ex.aux
The style file: linquiry2.bst
Database file #1: references.bib
$ latex bibtex_ex
This is TeX, Version 3.14159 (Web2C 7.3.7)
(./bibtex_ex.tex
LaTeX2e <2001/06/01>
Babel  and hyphenation patterns for american, french, german,
ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/natbib/natbib.sty) (./bibtex_ex.aux)
(./bibtex_ex.toc) [1]

Package natbib Warning: Citation `firchow:1969' on page 2 undefined on
input li
ne 33.


Package natbib Warning: Citation `maddieson:1984' on page 2 undefined
on input
line 35.

[2] (./bibtex_ex.bbl)

Package natbib Warning: There were undefined citations.

[3] (./bibtex_ex.aux

Package natbib Warning: Citation(s) may have changed.
(natbib)                Rerun to get citations correct.

) )
Output written on bibtex_ex.dvi (3 pages, 1500 bytes).
Transcript written on bibtex_ex.log.
$ latex bibtex_ex
This is TeX, Version 3.14159 (Web2C 7.3.7)
(./bibtex_ex.tex
LaTeX2e <2001/06/01>
Babel  and hyphenation patterns for american, french, german,
ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/natbib/natbib.sty) (./bibtex_ex.aux)
(./bibtex_ex.toc) [1] [2] (./bibtex_ex.bbl) [3] (./bibtex_ex.aux) )
Output written on bibtex_ex.dvi (3 pages, 1544 bytes).
Transcript written on bibtex_ex.log.
$
  

Diagram

This process is summarized diagramatically below:

[Taken from Goosens, Mittelbach, and Samarin (1994) The LaTeX Companion, Figure 12.1, p. 375]


Back to Main Page   Monday, 06-Sep-2010 15:38:13 UTC