Previous: , Up: `thebibliography`   [Contents][Index]

#### 8.24.4 Using BibTeX

As described in `thebibliography` (see `thebibliography`), a sophisticated approach to managing bibliographies is provided by the BibTeX program. This is only an introduction; see the full documentation on CTAN (see CTAN: The Comprehensive TeX Archive Network).

With BibTeX, you don’t use the `thebibliography` environment directly (see `thebibliography`). Instead, include these lines:

```\bibliographystyle{bibstyle}
\bibliography{bibfile1, bibfile2, ...}
```

The bibstyle refers to a file bibstyle.bst, which defines how your citations will look. The standard bibstyle’s distributed with BibTeX are:

`alpha`

Labels are formed from name of author and year of publication. The bibliographic items are sorted alphabetically.

`plain`

Labels are integers. Sort the bibliographic items alphabetically.

`unsrt`

Like `plain`, but entries are in order of citation.

`abbrv`

Like `plain`, but more compact labels.

Many, many other BibTeX style files exist, tailored to the demands of various publications. See the CTAN topic https://ctan.org/topic/bibtex-sty.

The `\bibliography` command is what actually produces the bibliography. Its argument is a comma-separated list, referring to files named bibfile1.bib, bibfile2.bib, … These contain your database in BibTeX format. This shows a typical couple of entries in that format.

```@book{texbook,
title     = {The {{\TeX}}book},
author    = {D.E. Knuth},
isbn      = {0201134489},
series    = {Computers \& typesetting},
year      = {1983},
Only the bibliographic entries referred to via `\cite` and `\nocite` will be listed in the document’s bibliography. Thus you can keep all your sources together in one file, or a small number of files, and rely on BibTeX to include in this document only those that you used.
With BibTeX, the keys argument to `\nocite` can also be the single character ‘*’. This means to implicitly cite all entries from all given bibliographies.