BibTeX bibliography in LaTeX
| The .bib file | |
| Citing in text | |
| Build order | |
| Styles change everything | |
| Managers, not Notepad |
The .bib file
References live in a separate text database with the .bib extension. One entry per source, each with a key you will cite by:
@book{knuth1984,
author = {Donald E. Knuth},
title = {The TeXbook},
year = {1984}
}
Citing in text
Cite with \cite{knuth1984} and pick a style with \bibliographystyle{plain}, then print the list with \bibliography{mybase} where the document ends. Only cited entries appear — the .bib file can hold hundreds you never use.
Build order
One pdflatex run is not enough: references resolve across passes. The classic order is pdflatex, bibtex, pdflatex, pdflatex. If question marks survive, you skipped a pass — run the chain again before suspecting the .bib file.
Styles change everything
The same .bib database renders as [1], (Knuth, 1984) or footnotes depending on the style: plain numbers, author-year, alphabetic labels. Switch styles with one line, never by editing entries — content and presentation stay separated exactly like LaTeX itself promises.
Managers, not Notepad
Past fifty entries, maintain the .bib with JabRef or Zotero export, not by hand: duplicate keys and broken braces are the top two «mysterious» BibTeX failures. Keep one canonical file under version control and generate per-paper subsets from it, not the reverse.
| LaTeX | |
| BibTeX bibliography | |
| Tutorial | |
| Errors |