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.
\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}\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}.
\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}\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.
\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}\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
- LaTeX Warning: Reference `<label>' on page <n> undefinedA \ref, \eqref or \pageref names a label LaTeX has not seen: a typo, a missing \label, or a part excluded by \includeonly. Prints ?? in the PDF.
- LaTeX Warning: There were undefined references.The end-of-run summary: some \ref or \cite did not resolve. Find the individual "Reference ... undefined" or "Citation ... undefined" lines above it.
- LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.Some label's number or page changed during this run, so references printed from the old .aux may be wrong. Compile again; if it never settles, look for a loop.
- LaTeX Warning: Label `<label>' multiply defined.Two \label commands use the same name, so every \ref to it shows whichever came last. Rename one, and update the \ref commands that meant it.
- Repeated entry---line <n> of file <name>.bibTwo .bib entries share one citation key. BibTeX keeps the first and skips the other. Delete the duplicate or give it its own key.
- I was expecting a `,' or a `}'---line <n> of file <name>.bibA .bib entry is malformed, most often a missing comma between fields or a space in the key. BibTeX skips the rest of the entry.
Every example on this page was compiled with pdfLaTeX and BibTeX to check that it fails and is fixed as described. All LaTeX errors