Manage LaTeX References with BibTeX and biblatex
Keep bibliography data separate from presentation. Follow the publisher or university template first, then choose manual entries, traditional BibTeX, or biblatex. The complete examples below use matching citation keys and real books rather than invented DOI records.
Choose a Workflow
| Method | Suitable use | Main commands |
|---|---|---|
thebibliography | A small list that will not be reused | \bibitem and \cite |
| BibTeX | A template requiring a .bst style | \bibliographystyle and \bibliography |
| biblatex | Flexible styles without a conflicting template requirement | \addbibresource and \printbibliography |
This manual example needs no .bib file. Reference numbers may still require repeat LaTeX passes managed by the platform:
\documentclass[a4paper,11pt]{article}
\begin{document}
For typesetting background, see~\cite{knuth1984}.
\begin{thebibliography}{9}
\bibitem{knuth1984} Donald E. Knuth. \emph{The TeXbook}. Addison-Wesley, 1984.
\end{thebibliography}
\end{document}
Create refs.bib
Create refs.bib in the file tree with these two published books. Their keys are knuth1984 and lamport1994:
@book{knuth1984,
author = {Donald E. Knuth},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1984}
}
@book{lamport1994,
author = {Leslie Lamport},
title = {LaTeX: A Document Preparation System},
edition = {2},
publisher = {Addison-Wesley},
year = {1994}
}
Reuse the database across projects, but check field and style compatibility when changing bibliography systems, especially for specialized fields.
Use biblatex and Biber
Keep that database at the project root and use this main file:
\documentclass[a4paper,11pt]{article}
\usepackage[backend=biber,style=authoryear,maxcitenames=2]{biblatex}
\addbibresource{refs.bib}
\usepackage{hyperref}
\begin{document}
Background on typesetting is given in~\parencite{knuth1984}.
\textcite{lamport1994} describes document preparation with LaTeX.
\printbibliography
\end{document}
backend=biberselects the bibliography processor.style=authoryearselects an author–year presentation.maxcitenames=2controls the author names displayed in citations.\addbibresource{refs.bib}uses the full database filename.\parencite,\textcite, and\printbibliographyprovide parenthetical citations, textual citations, and the list.
Choose pdfLaTeX in the editor settings and compile. EasyLaTeX handles the LaTeX/Biber dependency passes. If [?] remains after the job finishes, check the current log, keys, and paths.
Use BibTeX for a .bst Template
This example uses plainnat. For a supplied .bst, use its basename without the extension and retain the template's package setup:
\documentclass[a4paper,11pt]{article}
\usepackage{natbib}
\begin{document}
For typesetting background, see~\citep{knuth1984}.
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}
\bibliography{refs} is the traditional BibTeX database command. Do not mix its setup and output commands with biblatex's in the same configuration.
Change the Style
These alternatives replace the existing biblatex loading line; choose one, not both:
\usepackage[backend=biber,style=numeric]{biblatex}
\usepackage[backend=biber,style=authoryear]{biblatex}
Use a publisher-specific style such as IEEE or APA only when it matches the actual requirements and available template configuration. A style determines presentation; database fields determine the information available to display. Check names, dates, ordering, volume, pages, and DOI after a change.
Common Problems
| Symptom | Where to look | Action |
|---|---|---|
[?] or an unresolved key | Current job and bibliography log | Wait for processing, then inspect configuration and keys |
Citation 'xxx' undefined | Body and database | Match spelling and capitalization |
| Empty bibliography | Citation and output commands | Cite an entry and place the output before \end{document} |
| Missing file | File tree and paths | Check the .bib or template .bst location |
Further Operations
A short list can remain manual; do not migrate a working publisher template merely to change tools. \printbibliography[type=book] filters by type; refsection can organize separate lists. Begin with a working minimal project before adding those features.
See checking citations in both directions for completeness checks.