# authoryear not working when using elsarticle template or own original tex file

I am trying to use the elsarticle.cls for a journal that needs (author, year) format for the citations. I have tried the following:

\documentclass{elsarticle}
\usepackage[authoryear]{natbib}


This results in "Option clash for package natbib"

\documentclass[authoryear]{elsarticle}
\usepackage{natbib}


This results in: "Bibliography not compatible with author-year citations".

I am using \cite{REF} for citations and the errors happen with other permutations of \cite{} too. I am using the following for inserting the bibliography, it is happening with both a BibTex and BibLaTex formats.

 \bibliography{BIB_Name}{}
\bibliographystyle{plain}


I have tried removing other \@biboptions from the .cls file (now reverted) and that does not work. I have tried \setcitestyle{author year} with the same "Bibliography not compatible with author-year citations"

I have inspected my .bib file (both versions) and they have author and date information in the following format, it is an export from Zotero.

@incollection{petterson_microbial_2006,
title = {Microbial {Risk} {Assessment}: {A} {Scientific} {Basis} for {Managing} {Drinking} {Water} {Safety} from {Source} to {Tap}},
booktitle = {{QMRA} {Methodology}},
publisher = {Microrisk},
author = {Petterson, S. and Signor,, R. and Ashbolt,, N. and Roser,, D.},
year = {2006}
}


The PDF renders and I have a bibliography with a citation in the style [1,2] or (1;2) but I need it to be (author, date).

Am I being stupid about something or is there something I am just missing here?

Thanks,

Mark

Here is the code reflecting Siba's answer:

\documentclass[3p,times]{elsarticle}
\usepackage{natbib}
\usepackage{amssymb}

\begin{document}

\begin{frontmatter}

\title{TITLE TEXT}

\author[1,2]{Mark\corref{cor1}}

\cortext[cor1]{Corresponding author}

\begin{abstract}
abstract text

\end{abstract}

\begin{keyword}

keyword1 \sep keyword2

\end{keyword}

\end{frontmatter}

\section{Introduction}

Due especially to its regulatory and public health implications \citep{us_epa_national_2000, petterson_microbial_2006}

\bibliography{Dose_Response_App_2}{}
\bibliographystyle{elsarticle-harv}

\end{document}

• With \documentclass[3p,times,authoryear]{elsarticle} I get the expected style. No need to load natbib again. – egreg Apr 13 '16 at 20:49

The elsarticle class already loads natbib; if you want to get an author-year citation style you just have to pass the appropriate class option:

\documentclass[3p,times,authoryear]{elsarticle}

\documentclass[3p,authoryear,times]{elsarticle}%document class file
\usepackage{amssymb,natbib}
\begin{document}

\begin{frontmatter}

\title{TITLE TEXT}

\author[1,2]{Mark\corref{cor1}}

\cortext[cor1]{Corresponding author}

\begin{abstract}
abstract text

\end{abstract}

\begin{keyword}

keyword1 \sep keyword2

\end{keyword}

\end{frontmatter}

\section{Introduction}

Due especially to its regulatory and public health implications \cite{r1}
\bibliographystyle{elsarticle-harv}
\bibliography{refer}

\end{document}


You need to put the elsarticle-harv.bst in your working directory and also you have to add authoryear in the \documentclass. Hope this helps. The output is coming absolutely fine. Moreover, the screenshot of the output have been attached for your knowledge. Do vote for the answer if it serve your purpose.

• Thank you for the reply but there are still problems. I have the elsarticle-harv.bst file as well as the .cls file in the working directory. However it is still not giving me (author, date) for the citation and now the year has disappeared from the references themselves. New errors are showing up for the Filename.bbl file that I cannot see. missing $inserted in the .bbl file extra } or missing$ in .bbl file Still not sure what is happening. Shall I put the MWE in an answer to this post? – Mark Weir Apr 13 '16 at 18:45
• Just noticed that the .bbl file is not being generated based on what the complete error text. Also it seems to not be finding the year in the .bib file despite it being there. This is also still not working on the template file either. I am using TexPad on OS X if that makes a difference. – Mark Weir Apr 13 '16 at 18:54
• Don't load the natbib package again -- it's already being loaded by the document class. – Mico Apr 14 '16 at 6:50