# BibTeX

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
34,196pages on
this wiki

BibΤΕΧ, written as BibTeX in plain text, 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. 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.

## Bibliographic information file: `.bib` Edit

BibTeX uses a style-independent text-based file format for lists of bibliography items, such as articles, books, theses. BibTeX bibliography files usually end in `.bib`. Bibliography items included in a `.bib` are split by types. The following types are understood by virtually all BibTeX styles:

• article: An article from a journal or magazine.
• book: A book with an explicit publisher. Required fields: author or editor, title, publisher, year.
• booklet: A work that is printed and bound, but without a named publisher or sponsoring institution.
• conference: The same as inproceedings, included for Scribe (markup language) compatibility.
• 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: For use when nothing else fits.
• phdthesis: A Ph.D. 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.

## Bibliographic style file: `.bst`Edit

BibTeX style files, for which the suffix `.bst` is common, are written in a simple, stack-based programming language that describes how bibliography items should be formatted. The BibTeX program `bibtex` will then format bibliographic items according to a style file, typically by generating TeX or LaTeX formatting commands. However, style files for generating HTML output also exist.

## ExampleEdit

A `.bib` file might contain the following entry, which describes a mathematical handbook:

```@Book{abramowitz+stegun,
author =	 "Milton Abramowitz and Irene A. Stegun",
title = 	 "Handbook of Mathematical Functions with
Formulas, Graphs, and Mathematical Tables",
publisher = 	 "Dover",
year = 	 1964,
edition =	 "ninth Dover printing, tenth GPO printing",
isbn =         "0-486-61272-4"
}
```

If a document references this handbook, the bibliographic information may be formatted in different ways depending on which citation style (APA, MLA, Chicago etc.) is employed. The way LaTeX deals with this is by specifying `\cite` commands and the desired bibliography style in the LaTeX document. If the command `\cite{abramowitz+stegun}` appears inside a LaTeX document, the `bibtex` program will include this book in the list of references for the document and generate appropriate LaTeX formatting code. When viewing the formatted LaTeX document, the result might look like this:

Abramowitz, Milton and Irene A. Stegun (1964), Handbook of mathematical functions with formulas, graphs, and mathematical tables. New York: Dover.

Depending on the style file, BibTeX may rearrange authors' last names, change the case of titles, omit fields present in the `.bib` file, format text in italics, add punctuation, etc. Since the same style file is used for an entire list of references, these are all formatted consistently with minimal effort required from authors or editors.

## Style files for different usesEdit

There are many different style files 'readymade' for different journals. If you need to customize citation styles even further you can use the natbib package, or use the `makebst` package.