I found no \bibdata command

BibTeX read the .aux file and found no \bibliography, no \cite or no \bibliographystyle. Add the missing command, or run biber for biblatex.

Help centre › LaTeX errors › References and bibliography · Error: the build stops or the output is wrong

What the log says

This is BibTeX, Version 0.99e
The top-level auxiliary file: main.aux
I found no \bibdata command---while reading file main.aux
I found no \bibstyle command---while reading file main.aux
(There were 2 error messages)

Also printed as: I found no \citation commands; I found no \bibstyle command

What it means

BibTeX does not read your .tex file. It reads the .aux file, where LaTeX records three things: the cited keys (\citation, from \cite), the .bib files (\bibdata, from \bibliography) and the style (\bibstyle, from \bibliographystyle). If one of the three is missing, BibTeX reports it and writes no usable bibliography.

Causes and fixes

Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.

1. \bibliography{…} is missing (no \bibdata)

Add \bibliography{refs} where the reference list should appear, naming the .bib file without its extension.

Fails
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
As shown by \cite{smith2020}, the effect is small.
\bibliographystyle{plain}
\end{document}
Fixed
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
As shown by \cite{smith2020}, the effect is small.
\bibliographystyle{plain}
\bibliography{refs}
\end{document}

2. The document uses biblatex, but BibTeX was run instead of biber

biblatex writes its own data to the .aux file, which BibTeX does not recognize, so it reports no \citation, \bibdata or \bibstyle at all. Run biber main instead of bibtex main; or, if only BibTeX is available, load \usepackage[backend=bibtex]{biblatex}.

Fails
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
As shown by \cite{smith2020}, the effect is small.
\printbibliography
\end{document}
Fixed
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{refs.bib}
\begin{document}
As shown by \cite{smith2020}, the effect is small.
\printbibliography
\end{document}

3. The document cites nothing (no \citation)

BibTeX lists only entries that are cited. Add \cite commands, or \nocite{*} to list every entry in the .bib file, as in a publication list.

Fails
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
Selected publications.
\bibliographystyle{plain}
\bibliography{refs}
\end{document}
Fixed
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
  author  = {Smith, Jane and Brown, Paul},
  title   = {Measuring Things Carefully},
  journal = {Journal of Measurement},
  year    = {2020},
  volume  = {12},
  pages   = {1--10}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
Selected publications.
\nocite{*}
\bibliographystyle{plain}
\bibliography{refs}
\end{document}

4. \bibliographystyle{…} is missing (no \bibstyle)

Add \bibliographystyle{plain}, or the style the journal asks for, before \bibliography. Many journal classes set the style for you; check the template's instructions before adding one.

In Manulyx

Manulyx chooses BibTeX or biber for you from what the document loads, so a biblatex document is not run through BibTeX by mistake.

Write in Manulyx for free · Journal templates

More in references and bibliography

Every example on this page was compiled with pdfLaTeX and BibTeX to check that it fails and is fixed as described. All LaTeX errors