Package natbib Error: Bibliography not compatible with author-year citations.
natbib wants author-year data, but the bibliography style gives only numbers. Use an author-year style such as plainnat, or load natbib with [numbers].
Help centre › LaTeX errors › References and bibliography · Error: the build stops or the output is wrong
What the log says
! Package natbib Error: Bibliography not compatible with author-year citations.
(natbib) Press <return> to continue in numerical citation style.
See the natbib package documentation for explanation.
l.3 ...citeyear}{\bibitem{smith2020}What it means
natbib loads in author-year mode by default and needs each bibliography entry to carry the authors and year. The .bbl file in use was written by a numeric style (such as ieeetr, siam or a journal's numeric .bst), which gives only a number. natbib recognizes the standard plain, unsrt, abbrv and alpha styles and switches to numbers silently; for any other numeric style it stops with this error and then falls back to numeric citations, so commands like \citet print a number instead of a name.
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. A numeric bibliography style is used with natbib's default author-year mode
Choose a natbib-compatible style: plainnat, abbrvnat or unsrtnat, or the journal's own author-year .bst. Delete the old .bbl (or recompile from scratch) so BibTeX writes a new one.
\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{natbib}
\begin{document}
\citet{smith2020} measured the effect.
\bibliographystyle{ieeetr}
\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}
\usepackage{natbib}
\begin{document}
\citet{smith2020} measured the effect.
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}2. The journal wants numbered citations
Keep the numeric style and load natbib in numeric mode: \usepackage[numbers]{natbib}. Then use \citep for [1] and \citet for "Smith et al. [1]" only with a style that provides names.
\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{natbib}
\begin{document}
The effect is small \citep{smith2020}.
\bibliographystyle{ieeetr}
\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}
\usepackage[numbers]{natbib}
\begin{document}
The effect is small \citep{smith2020}.
\bibliographystyle{ieeetr}
\bibliography{refs}
\end{document}3. A hand-written thebibliography has \bibitem without the author-year label
For author-year citations natbib needs \bibitem[Smith and Brown(2020)]{smith2020}: the short author list, the year in parentheses, then the key. Add the optional argument to each \bibitem, or load natbib with [numbers].
In Manulyx
The editor shows the error with an explanation. Manulyx reruns BibTeX when the bibliography style changes, so switching to an author-year style takes effect on the next compile.
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.
- I couldn't open database file <name>.bibBibTeX cannot find the .bib file named in \bibliography. Check the spelling and folder, and write the name without the .bib extension.
- I found no \bibdata commandBibTeX read the .aux file and found no \bibliography, no \cite or no \bibliographystyle. Add the missing command, or run biber for biblatex.
Every example on this page was compiled with pdfLaTeX and BibTeX to check that it fails and is fixed as described. All LaTeX errors