Next: Errors Up: Structures Previous: Figures and tables

# Producing a bibliography

The bibliography list is produced with the thebibliography environment. This is a rather special form of list making environment, which will also produce its own heading. A simple example is: 1


\begin{thebibliography}{Rubinsteinetal}

\bibitem[Knuth86]{knuth}
Donald E Knuth, {\em The \TeX book}, Addison-Wesley, 1986,
ISBN 0-201-13447-0

\bibitem[Lamport86]{lamport}
Leslie Lamport, {\em \LaTeX\ A Document Preparation System},

\bibitem[Rubinstein88]{rubinstein}
Richard Rubinstein, {\em Digital Typography: An Introduction to
Type and Composition for Computer System Design}, Addison-Wesley,
1988, ISBN 0-201-17633-5

\end{thebibliography}
1.3The argument of the thebibliography environment should be a piece of text which is slightly wider than the widest item in the list.

Each \bibitem entry must have an associated label that can be referenced from the \cite command (see below). It may also have an optional argument preceding this (in square brackets) that is used to define the user's own reference labels that will appear in the document. If this is not used, then as a default will produce numerical reference labels, so that in this case the argument for the thebibliography environment need only be a short string such as {100}.

The bibliography is most easily maintained by storing it in a separate file such as biblio.tex. This form is used in the root file example given at the beginning of this chapter.

Citations are produced by the \cite command. Associated with the \cite command is a label, which is used to provide a reference to an entry in the bibliographic database. As an example, using the above items, the phrase


... in the \TeX book \cite{knuth} ...
would appear as
...in the book [Knuth86] ...

Running produces a number of files, one of which, the auxiliary (.aux) file, includes cross referencing information. The .aux file is also used in the creation of the table of contents (.toc), and the lists of figures (.lof) and tables (.lot). Modifications to your document which effect the table of contents, etc are incorporated the second time around. For example, the \tableofcontents command, which appears in the preamble, tells to create a new .toc file and use the previous one (if any exists) to generate the contents page for inclusion in the current document. The .toc file, therefore, is one step out of phase with the document and consequently a second run is required. in effect is a two-pass compiler.

Next: Errors Up: Structures Previous: Figures and tables

webweaver@cs.stir.ac.uk