Vous êtes sur la page 1sur 3

Introduction to BibTeX

J. Gardner
dataninja.wordpress.com
dataninja@gmail.com

January 10, 2006

1 What is BibTeX?
BibTeX is a file format and a program designed to work with LaTeX. The file format
stores bibliographical information like author name, journal title, date,etc. The program
incorporates files stored in a BibTeX file (.bib) into LaTeX documents.
BibTeX databases A BibTeX database is essentially a plain text file containing bibli-
ography entries. A BibTeX file might look like this:[1]
@article{Gettys90,
author = {Jim Gettys and Phil Karlton
and Scott McGregor},
title = {The {X} Window System, Version 11},
journal = {Software Practice and Experience},
volume = {20},
number = {S2},
year = {1990},
abstract = {A technical overview of the X11
functionality. This is an update of the X10
TOG paper by Scheifler \& Gettys.}
}

2 What this means


• In the first line, @article lets BibTeX know that the bibliographical entry is an
article. Other entry types include book, phdthesis and unpublished (and others).
• Gettys90 is the identifier for that entry – it is a type of shorthand that will allow
the users to refer to the entry quickly when writing a LaTeX document.
• Notice that multiple authors are seperated by the word and.

1
3 BibTeX database management software
There are applications that provide a graphical interface that allow users to manage their
BibTeX databases. These applications are very useful, because the number of different
fields (article/book/manual/etc. or title/journal/issue/note/etc.) is quite large.
• For Mac OS X users there is BibDesk – bibdesk.sourceforge.net.
• For Windows users there is BibEdit – www.iui.se/staff/jonasb/bibedit/.
These applications will allow you to input and edit bibliographical entries and save them
as BibTeX databases that can be used in LaTeX documents.

4 Using BibTeX in a LaTeX document


In order to use your BibTeX database in a LaTeX document, you must essentially do three
things:
1. Set the bibliography style. The standard is plain:

\bibliographystyle{plain}

put this command after the \begin{document} command in your LaTeX document.
Other styles include
unsrt The same as plain except entries are numbered based on when they are cited,
not alphabetically by author.
alpha Similar to plain except instead of having numerical identifiers (e.g. [1]), labels
are created based on the year of publication and the name of the author(s).
abbrv Names and journal titles are abbreviated.
2. Make citations. When you come to a passage in your text that youd like to cite,
insert the LaTeX command

\cite{ident}

where ident is the identifier you chose when either typing the database file by hand
or using a graphical manager.
3. Tell LaTeX to make the bibilography. This happens at the end of the LaTeX docu-
ment. Just type

\bibliography{bibfile}

where bibfile is the the file bibfile.bib – your BibTeX database.

2
5 Running BibTeX
The hardest part is running BibTeX on your LaTeX file. This assumes that you have
BibTeX installed already (most distributions come with it by default). The steps are:

1. Run LaTeX on your .tex file – this will generate the .aux file that BibTeX needs to
find the citations.

2. Run BibTeX on your .tex file – this can usually be done from your LaTeX frontend.
If not, use the command line.

3. Run LaTeX on your .tex file – this will create the bibliography section in the docu-
ment, but will not insert the correct numbering

4. Run LaTeX on your .tex file one more time – this step finishes everything; the refer-
ences section will be created and all of the citations will be properly numbered.

Note TeXShop for OS X includes an AppleScript that will execute these four steps
automatically.

References
[1] The BibTeX Format. Dana Jacobsen. 1996. http://www.ecst.csuchico.edu/ ja-
cobsd/bib/formats/bibtex.html.

[2] LaTeX Tricks: BibTeX. Peter Newbury. 1995. http://www.iam.ubc.ca/ new-


bury/tex/bibtex.html.