Citation Undefined
LaTeX Warning: Citation 'XXX' on page N undefined.
What this error means
A \cite{key} command references a bibliography key that doesn't exist in the current .bib file, or BibTeX/Biber has not been run. This produces [?] in the output instead of the citation number.
Common causes
- The citation key doesn't exist in any loaded .bib file
- BibTeX or Biber has not been run after adding the citation
- The .bib file path in \bibliography{} is wrong
- Typo in the citation key (keys are case-sensitive)
How to fix it
Run the full compilation sequence: pdflatex → bibtex → pdflatex → pdflatex. Check that the key in \cite{key} exactly matches the key in your .bib file. Verify the \bibliography{} path points to the correct .bib file.
Code examples
\documentclass{article}
\begin{document}
See~\cite{smith2024} for details.
\bibliography{refs}
\bibliographystyle{plain}
\end{document}% refs.bib must contain:
% @article{smith2024,
% author = {Smith, John},
% title = {My Paper},
% year = {2024},
% }
\documentclass{article}
\begin{document}
See~\cite{smith2024} for details.
\bibliography{refs}
\bibliographystyle{plain}
\end{document}Related errors
File Not Found
! LaTeX Error: File 'XXX' not found.
Unknown Graphics Extension
! LaTeX Error: Unknown graphics extension: .XXX.
Unicode Character Not Supported (pdfLaTeX)
! Package inputenc Error: Unicode char U+XXXX not set up for use with LaTeX.
Cannot Determine Size of Graphic (No BoundingBox)
! LaTeX Error: Cannot determine size of graphic (no BoundingBox).
Test the fix live
Paste your LaTeX into the playground and compile instantly.

