2

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.

  • Do remember that you are not in control of how the journal will typeset your bibliography, so you might be wasting your time here. Though it is an interesting problem. – daleif Jan 9 '17 at 20:40
  • @daleif The bibliography itself is not the problem, but how the citation appears in the text. I believe this must be set by me since it affects text size and could mess up table/figure placements, page count, etc. – Leandro Nogueira Couto Jan 9 '17 at 20:50
  • 1
    That again is a layout issue, and is decided by the journal. It looks strange in a journal to have one article using author-year, the next numbers, etc. Basically your responsibility is to provide the content of the article, mark your cross references, citations etc, the rest is decided by the journal. I have been on the receiving side, and it is really annoying when authors decide to change the layout of the template they are given, just because they do not like it. Your issue is minor though (I've seen authors change the fonts and margins, complete waste of their time and mine at the other e – daleif Jan 9 '17 at 21:00
  • 1
    @daleif - A quick glance at some of the articles published by Pattern Recognition Letters reveals a (to me) unusual feature: Some of the published articles use authoryear-style citation call-outs, and others use numeric-style call-outs. Apparently, the journal's editorial staff doesn't impose uniformity with regard to citation call-out styles. – Mico Jan 9 '17 at 21:16
  • 1
    @daleif I do realize the template files shouldn't be edited, but, as Mico points out, the Latex template they make available has templates for both bibliography styles (elsarticle-num.tex and elsarticle-harv.tex). Weird, but thanks for the help. – Leandro Nogueira Couto Jan 10 '17 at 1:03
0

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 the natbib citation management package. Because the elsarticle-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:

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{refs.bib}
@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}
}
\end{filecontents}

\documentclass[times,twocolumn]{elsarticle}
\bibliographystyle{elsarticle-num}
%%%\usepackage{prletters} % I don't seem to have this package
\usepackage{amssymb}
%%%\usepackage{latexsym}  % <-- don't load latexsym if you load amssymb
\journal{Pattern Recognition Letters}

\begin{document}
\cite{Brodatz1966}
\bibliography{refs}
\end{document}
  • That's exactly it. Looks simple enough, but I totally missed the connection between the error and that option in \documentclass. Thanks! – Leandro Nogueira Couto Jan 9 '17 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.