Let
X
Journal

How to Add Citations and a Bibliography in LaTeX

SPECIMEN IDLETX-SPEC-LATE
DATE RECORDEDApr 13, 2026
READING COMPLEXITY3 min read
TAG INDEX
latexbibtexbiblatexcitations
Document Abstract

To cite in LaTeX, store references in a .bib file and use \cite{key} with BibLaTeX or BibTeX, then print the list with \printbibliography. Full setup inside.

To cite in LaTeX, store your references in a .bib file and reference them by key with \cite{key}. Load BibLaTeX, point it at the file with \addbibresource{refs.bib}, and print the formatted list with \printbibliography. LaTeX numbers, sorts, and styles every entry automatically — you never format a reference by hand.

1. Create the .bib database

A .bib file holds one entry per source. Each entry has a type (@article, @book, @inproceedings), a unique key, and fields.

% refs.bib
@inproceedings{vaswani2017,
  author    = {Vaswani, Ashish and others},
  title     = {Attention Is All You Need},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2017}
}

@book{knuth1984,
  author    = {Knuth, Donald E.},
  title     = {The {\TeX}book},
  publisher = {Addison-Wesley},
  year      = {1984}
}

The key (vaswani2017) is how you cite. Keep keys consistent — authorYEAR is the common convention.

2. Cite with BibLaTeX (recommended)

BibLaTeX is the modern engine. It uses the biber backend, supports Unicode, and offers dozens of styles.

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

\begin{document}
The Transformer architecture~\parencite{vaswani2017} reshaped NLP.
Knuth~\textcite{knuth1984} designed \TeX{} for typesetting.

\printbibliography
\end{document}

\parencite gives a parenthetical citation; \textcite puts the author in the sentence. Only sources you actually cite appear in the list — add \nocite{*} to force every entry in.

3. Or use classic BibTeX with natbib

Many older journal templates still ship BibTeX. The equivalent commands come from natbib.

| Task | BibLaTeX | BibTeX + natbib | |---|---|---| | Engine to run | biber | bibtex | | Parenthetical | \parencite{k} | \citep{k} | | In-text author | \textcite{k} | \citet{k} | | Print list | \printbibliography | \bibliography{refs} | | Set style | style= option | \bibliographystyle{} |

For the full trade-off, read BibTeX vs BibLaTeX.

4. The compile sequence (why citations break)

References resolve in a multi-pass build. The first pdflatex records which keys you cited; biber (or bibtex) reads the .bib and builds the list; the next two passes insert the numbers and fix cross-references. Skip a pass and every citation shows [?]. LetX runs the full sequence on every save, so you see resolved citations instantly instead of debugging a four-command build by hand.

5. Get references without typing them

Don't hand-type entries. Export BibTeX from Google Scholar (the quote icon → BibTeX), Zotero, or your journal's website. See Manage References With LetX: Zotero → Bibliography for a clean import workflow.

→ Manage citations live in LetX. Building a full paper? See How to Write a Research Paper in LaTeX.


Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs, maker of LetX.

Frequently Asked Questions

What is the difference between \cite, \textcite, and \parencite?

In BibLaTeX, \cite{key} prints a bare citation, \parencite{key} wraps it in parentheses, and \textcite{key} prints the author's name in running text followed by the year, e.g. 'Shannon (1948) showed...'. Use \textcite when the author is the grammatical subject of your sentence and \parencite when the citation is parenthetical support. Classic BibTeX with natbib offers \citet and \citep for the same two cases.

Why does my citation show up as a question mark or [?]?

A [?] or '??' means the citation key was never resolved, almost always because you didn't run the bibliography pass. BibLaTeX needs the sequence pdflatex → biber → pdflatex → pdflatex; classic BibTeX needs pdflatex → bibtex → pdflatex → pdflatex. Online editors like LetX run this automatically. Also check that the key in \cite{} exactly matches the key in your .bib entry — keys are case-sensitive.

Can I change the citation style to APA, IEEE, or Nature?

Yes. With BibLaTeX, set the style in the package options: \usepackage[style=apa]{biblatex}, style=ieee, or style=nature. With classic BibTeX, you set it with \bibliographystyle{plain}, ieeetran, or apalike. BibLaTeX has far more built-in styles and is easier to customize, which is why it is the recommended choice for new projects in 2026.