LaTeX Guide

LaTeX Bibliography

BibTeX is classic; biblatex is modern. \cite{key} for citations, \bibliography{file} to render the list. Don't forget to run bibtex between LaTeX passes.

The classic BibTeX setup

\documentclass{article}

\begin{document}
According to recent work \cite{smith2024}, ...

\bibliographystyle{plain}      % style
\bibliography{references}      % .bib file (no extension)
\end{document}

Compile sequence: pdflatex mainbibtex mainpdflatex mainpdflatex main. Two pdflatex runs after bibtex to resolve forward references.

The modern biblatex setup

\documentclass{article}
\usepackage[backend=biber, style=ieee]{biblatex}
\addbibresource{references.bib}

\begin{document}
According to recent work \cite{smith2024}, ...

\printbibliography
\end{document}

Compile with: pdflatexbiberpdflatexpdflatex. biblatex handles more entry types and integrates with hyperref out of the box.

Common citation commands

CommandRenders as (author-year style)
\cite{smith2024}depends on style; usually parenthetical
\citep{smith2024}(Smith, 2024)
\citet{smith2024}Smith (2024)
\citeauthor{smith2024}Smith
\citeyear{smith2024}2024
\cite{a, b, c}multi-citation

Citation styles

StyleOutput format
plain[1] alphabetical, default BibTeX
unsrt[1] in citation order
ieeetr / IEEE (biblatex)[1] IEEE format
acm / ACM-Reference-FormatACM citation format
plainnat (with natbib)(Smith, 2024)
apa / authoryearAPA author-year

BibTeX entry types

@article{smith2024,
  author  = {Jane Smith and John Doe},
  title   = {The Title of the Paper},
  journal = {Journal Name},
  year    = {2024},
  volume  = {42},
  number  = {3},
  pages   = {123-145},
  doi     = {10.1234/jn.2024.3.123}
}

@inproceedings{jones2023,
  author    = {Alice Jones},
  title     = {Conference Paper Title},
  booktitle = {Proceedings of CONF 2023},
  year      = {2023},
  pages     = {1-10}
}

@book{brown2022,
  author    = {Bob Brown},
  title     = {Book Title},
  publisher = {Publisher Name},
  year      = {2022},
  edition   = {2nd}
}

@misc{website2024,
  author = {{Organization}},
  title  = {Webpage Title},
  year   = {2024},
  url    = {https://example.com},
  note   = {Accessed 2024-05-01}
}

Common errors

  • Bibliography shows ??. You compiled with pdflatex but skipped bibtex/biber. Run the full sequence.
  • "Citation undefined" warnings. Same fix — run bibtex/biber.
  • Special characters in titles. Wrap in extra braces: title = {The {NMR} Spectroscopy} preserves the case of NMR.
  • Lower-case author names. BibTeX may capitalize automatically. Override with: author = {{van der Berg}, J.}.
  • Mixing BibTeX and biblatex commands. Pick one — they don't mix.
Typst handles bibliography in one line
Recent work @smith2024 confirms ...

#bibliography("references.bib", style: "ieee")

No bibtex/biber separate-compile dance. Same .bib file works directly. Try TypeTeX free.

Try TypeTeX free

Frequently Asked Questions

How do I add a bibliography to a LaTeX document?

The classic approach: store entries in references.bib, add \bibliographystyle{plain} (or another style) and \bibliography{references} where you want the bibliography to appear. Then compile with: pdflatex main, bibtex main, pdflatex main, pdflatex main (twice — bibliography needs multiple passes).

What's the difference between BibTeX and biblatex?

BibTeX is older (1985), uses .bst style files, and runs as a separate command. biblatex (2006+) is modernized — uses .bbx/.cbx style files, integrates better with hyperref, supports more entry types, and works with biber (a modern replacement for the bibtex command). For new documents, use biblatex unless your journal explicitly requires bibtex.

How do I cite in LaTeX?

\cite{key} gives the default citation form for your style — usually [1] for numeric or (Smith, 2024) for author-year. With natbib or biblatex, use \citet{key} for inline ('Smith (2024) showed...') and \citep{key} for parenthetical ('the result (Smith, 2024)'). The key matches the entry name in your .bib file.

What does a .bib file look like?

@article{smith2024, author = {Jane Smith}, title = {Title}, journal = {J. Important}, year = {2024}, volume = {42}, pages = {1-15}}. Each entry has a type (@article, @inproceedings, @book, @misc), a citation key, and fields. Field names depend on entry type.

How do I switch citation styles in LaTeX?

BibTeX: change \bibliographystyle{plain} to \bibliographystyle{ieeetr}, \bibliographystyle{acm}, \bibliographystyle{abbrv}, \bibliographystyle{plainnat} (with natbib), etc. biblatex: pass style to the package: \usepackage[style=ieee]{biblatex}. Other biblatex styles: authoryear, numeric, alphabetic, apa, chicago.

Why does my bibliography show ?? instead of citations?

You compiled only with pdflatex but didn't run bibtex/biber. The full sequence is: pdflatex → bibtex → pdflatex → pdflatex. Most LaTeX editors (Overleaf, TeXShop, TeXstudio) handle this automatically when you click 'compile' — but the first compile after adding a citation will show ?? until bibtex catches up.

How do I cite multiple sources at once?

\cite{key1,key2,key3} (separated by commas, no spaces). Renders as [1, 2, 3] for numeric, (Smith 2024; Jones 2023; Brown 2022) for author-year. Most styles consolidate consecutive numbers: [1-3].

What entry types does BibTeX support?

@article (journal), @inproceedings (conference paper), @book, @inbook (book chapter), @incollection (chapter in edited collection), @phdthesis, @mastersthesis, @techreport, @manual, @booklet, @misc (catch-all for websites, software). Each requires/optionally accepts different fields.

How do I include all entries from .bib (not just cited ones)?

Add \nocite{*} before \bibliography{} to include every entry in the .bib file regardless of whether it's cited. Useful for reference-only documents like reading lists. \nocite{key} adds one specific entry without citing it inline.

More LaTeX & citation guides