Monday, September 11, 2006

BibTeX

Introduction

BibTeX
is a tool for formatting lists of references used by the LaTeX document preparation system. BibTeX was created by Oren Patashnik and Leslie Lamport in 1985.


Why BibTeX

BibTeX makes it easy to cite sources in a consistent manner, by separating bibliographic information from the presentation of this information. This same principle of separation of content and presentation/style is used by LaTeX itself, by XHTML and CSS, etc.

References and citations are best handled in a consistent way by using BibTeX. In this method, you supply all the relevant information about references in a ``.bib file'' without regard to ordering or style. Then you let BibTeX format all citations and reference entries according to the chosen bibliographic style, and you don't have to sweat all the font and punctuation and ordering details yourself.


Standard Entry Types


@article
An article from a journal or magazine
@book
A book with an explicit publisher
@booklet
A work that is printed and bound, but without a named publisher or sponsoring institution
@conference
The same as inproceedings
@inbook
A part of a book, which may be a chapter (or section or whatever) and/or a range of pages
@incollection
A part of a book having its own title
@inproceedings
An article in a conference proceedings
@manual
Technical documentation
@mastersthesis
A Master's thesis
@misc
Use this type when nothing else fits
@phdthesis
A PhD thesis
@proceedings
The proceedings of a conference
@techreport
A report published by a school or other institution, usually numbered within a series
@unpublished
A document having an author and title, but not formally published

Standard Fields
address
Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.
annote
An annotation. It is not used by the standard bibliography styles, but may be used by others that produce an annotated bibliography.
author
The name(s) of the author(s), in the format described in the LaTeX book.
booktitle
Title of a book, part of which is being cited. See the LaTeX book for how to type titles. For book entries, use the title field instead.
chapter
A chapter (or section or whatever) number.
crossref
The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.
edition
The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.
editor
Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.
howpublished
How something strange has been published. The first word should be capitalized.
institution
The sponsoring institution of a technical report.
journal
A journal name. Abbreviations are provided for many journals.
key
Used for alphabetizing, cross referencing, and creating a label when the ``author'' information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.
month
The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation, as described in Appendix B.1.3 of the LaTeX book.
note
Any additional information that can help the reader. The first word should be capitalized.
number
The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series.
organization
The organization that sponsors a conference or that publishes a manual.
pages
One or more page numbers or range of numbers, such as 42--111 or 7,41,73--97 or 43++' in this last example indicates pages following that don't form a simple range). To make it easier to maintain Scribe-compatible databases, the standard styles convert a single dash (as in 7-33) to the double dash used in TeX to denote number ranges (as in 7--33). (the `
publisher
The publisher's name.
school
The name of the school where a thesis was written.
series
The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.
title
The work's title, typed as explained in the LaTeX book.
type
The type of a technical report---for example, ``Research Note''.
volume
The volume of a journal or multi-volume book.
year
The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four nonpunctuation characters are numerals, such as `\hbox{(about 1984)}'.

A Simple Example

Suppose we have a bib database mybib.bib generated with the following item:

@Book{hicks2001,
author = "Michael {von Hicks III} ",
title = "Design of a Carbon Fiber Composite Grid Structure for the
GLAST
Spacecraft Using a Novel Manufacturing Technique",
publisher = "Stanford Press",
year = 2001,
address = "Palo Alto",
edition = "1st",
isbn = "0-69-697269-4"
}


Then we write this simple test test.tex file:

\documentstyle{article}
\begin{document}
\bibliographystyle{abbrv}
\section{Introduction}

Test my bibliography database: \cite{hicks2001}.

\bibliography{mybib}
\end{document}

With these two files ready, we just need to run in a terminal:
latex test
bibtex test
latex test
latex test

For WinEdt users, you just need texify your test.tex file and
.dvi will be generated automatically.



Bibliography Styles


In the last example, \bibliographystyle{abbrv} specify the style used for this document.
There are many other choices in the standard LaTeX distribution. For more examples, see
http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html.