How to Add Citations and a Bibliography in LaTeX
Updated June 2026
To add citations in LaTeX, store references in a .bib file, cite them in text with \cite{key}, and print the list with \bibliography{file} (BibTeX) or \printbibliography (biblatex). Choose a style such as IEEE or APA. LetX compiles the full BibTeX run for you in the browser, so references and the bibliography resolve automatically.
Step by step
- 1
Create a .bib file
Add a references.bib file with entries like @article{key, author={...}, title={...}, year={...}}.
- 2
Cite in text
Use \cite{key} where you want the citation marker to appear.
- 3
Choose a style
With BibTeX: \bibliographystyle{ieeetr} (or plain, apalike). With biblatex: set style in \usepackage[style=ieee]{biblatex}.
- 4
Print the bibliography
BibTeX: \bibliography{references}. biblatex: \printbibliography.
- 5
Compile
Compile — LetX runs the BibTeX/biber pass automatically so citations resolve.
Example (BibTeX)
% references.bib
@article{einstein1905,
author = {Albert Einstein},
title = {Zur Elektrodynamik bewegter K\"orper},
journal = {Annalen der Physik},
year = {1905}
}
% main.tex
As shown in \cite{einstein1905}...
\bibliographystyle{ieeetr}
\bibliography{references}Managers like Zotero, Mendeley, and JabRef export .bib files directly, so you can build a library once and reuse it across papers.
Frequently asked questions
BibTeX or biblatex — which should I use?
biblatex is more modern and flexible (Unicode, easy style switching, uses biber); BibTeX is older but widely required by journal templates. Use whichever your target template specifies.
Why is my citation showing as [?]
A [?] means the citation key was not found or BibTeX has not run. Ensure the key matches your .bib entry and recompile. LetX runs the BibTeX pass automatically on compile.
How do I change citation style to APA or IEEE?
With BibTeX, set \bibliographystyle{apalike} or {ieeetr}. With biblatex, set style in the package options: \usepackage[style=apa]{biblatex} or [style=ieee].
Try this in LetX now
Open the editor, paste the example, and compile in 1–2 seconds — free, in your browser.
Start Writing Free