24. BibTeX
A separate programme which can be used to generate a list of references from
a bibliographic database.
- See Section 4.3 of LaTeX: A Document Preparation System, 1986
(and Appendix B).
- Documentation:
An Example
A file called tex_resources.bib with this content:
|
@BOOK{ll:latexbook,
AUTHOR = "Leslie Lamport",
TITLE = "\LaTeX, A Document Preparation System",
PUBLISHER = "Addison-Wesley",
YEAR = "1986"}
@MISC{jw:essential,
AUTHOR = "Warbrick",
TITLE = "{\it Essential \LaTeX}"}
|
...with a TeX file,
bibtex_example.tex which looks like:
|
\documentclass[12pt]{article}
\bibliographystyle{plain}
\begin{document}
\title{Mathematics Examples}
\author{Simon Hood}
\maketitle
Leslie Lamport's book \cite{ll:latexbook} is the obvious place to start,
but is probably better as the second or third place.
A better place is {\it Essential \LaTeX} \cite{jw:essential}.
\bibliography{tex_resources}
\end{document}
|
- Compile the tex file and then run bibtex:
|
latex bibtex_example
bibtex bibtex_example # ... 1. NO SUFFIX for bibtex
# 2. Yes, bibtex bibtex_example
# NOT bibtex tex_resources |
- Then compiler twice again to finalise references.
N.B.:
- You only need to run BibTeX again if the references change — i.e., if
you change your .bib file.
- You need run LaTeX only once (after edits to your document source) after
this.