I'm finishing a journal article using Elsevier's elsarticle document class.
My bibliography is yielding the following error (in output.aux):
Package natbib Error: Bibliography not compatible with author-year citations.
(natbib) Press <return> to continue in numerical citation style.
A minimal code that reproduces the error is:
\documentclass[times,twocolumn,final,authoryear]{elsarticle}
\usepackage{prletters}
\usepackage{framed,multirow}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{url}
\usepackage{xcolor}
\definecolor{newcolor}{rgb}{.8,.349,.1}
\journal{Pattern Recognition Letters}
\begin{document}
\cite{Brodatz1966}
\bibliographystyle{elsarticle-num}
\bibliography{refs}
\end{document}
Whenever I change the \bibliographystyle{elsarticle-num} line to \bibliographystyle{elsarticle-harv} or \bibliographystyle{elsarticle-num-names} the error goes away and it works normally, but then the format of the citation is not how I want it. I'm trying to get it in square brackets, like [23], but elsarticle-harv yields something like Brodatz (1966).
The refs.bib file contains the Brodatz1966 citation:
@BOOK{Brodatz1966,
title = {Textures: a photographic album for artists and designers},
publisher = {Dover Publications},
year = {1966},
author = {Brodatz, P.},
series = {Dover pictorial archives},
lccn = {66024124}
}
Any help would be appreciated. Thanks in advance.
Best Answer
Since you're looking to create numeric-style citation call-outs, you shouldn't be specifying the option
authoryear
at the\documentclass
stage.The
authoryear
option gets passed to thenatbib
citation management package. Because theelsarticle-num
bibliography style (unsurprisingly...) is designed to create numeric-style rather than authoryear-style citation call-outs, an error message is generated.A full MWE: