# Elsarticle: Getting author-year cite and bibliographystyle / Bibliography not compatible with author-year citations

I'm using elsarticle for sending a preprint to Elsevier. My .bib has been created by Mendeley app with +300 sources. When I try to activate the option [authoryear] it appears:

Package natbib Error: Bibliography not compatible with author-year citations.

I know the correct syntax in the .bbl file is demanded, and yes, my .bbl file does not have the format:

\bibitem [Potter H. et all (2001)]{potter2001)...

How can I create the .bbl with the [Potter H. et all (2001)] for every reference used without editing manually? Should I do it? Have I been missing something?

Here my code:

    \documentclass[review,1p,endfloat]{elsarticle}
\usepackage{lineno,hyperref}
\modulolinenumbers[2]
...
%Offered Elsevier's bibliography styles that I could activate:
%% Numbered
%\bibliographystyle{model1-num-names}

%% Numbered without titles
%\bibliographystyle{model1a-num-names}

%% Harvard
\bibliographystyle{model2-names}\biboptions{authoryear}

%% Vancouver numbered
%\usepackage{numcompress}\bibliographystyle{model3-num-names}

%% Vancouver name/year
%\usepackage{numcompress}\bibliographystyle{model4-names}\biboptions{authoryear}

%% APA style
%\bibliographystyle{model5-names}\biboptions{authoryear}

%% AMA style
%\usepackage{numcompress}
%\bibliographystyle{model6-num-names}

%% Elsevier LaTeX' style
%\bibliographystyle{elsarticle-num}

\begin{document}
...
For the purposes of this work, a physiological state will be considered
as the expressed metabolic response to a new stressor cite{Borowitzka2018}.
...
\bibliography{mybib}
\end{document}


I've trying to search for an answer in this forum and others...Sorry if this could be too basic or repetitive, it is my first big document in LaTeX.

An example of ´´´.bib´´´ :

@article{Borowitzka2018,
author = {Borowitzka, Michael A.},
doi = {10.1007/s10811-018-1399-0},
file = {:C$\backslash$:/Users/Vladimir/Desktop/Doctorado/Publications{\_}Doctorate/Borowitzka{\_}2018{\_}The ‘ stress ' concept in microalgal biology — homeostasis , acclimation and adaptation.pdf:pdf},
issn = {0921-8971},
journal = {J. Appl. Phycol.},
keywords = {Acclimation,Adaptation,Regulation,Stress,Stress si,acclimation,adaptation,homeostasis,reactive oxygen species,regulation,stress,stress signalling},
month = {oct},
number = {5},
pages = {2815--2825},
publisher = {Journal of Applied Phycology},
title = {{The ‘stress' concept in microalgal biology—homeostasis, acclimation and adaptation}},
url = {http://link.springer.com/10.1007/s10811-018-1399-0},
volume = {30},
year = {2018}
}

• Unfortunately, no. All the references I'm using have the field year={xxx} filled. – Vladimir Heredia Feb 5 at 23:02
• btw, it works well for me with my sample .bib. – Sunilkumar KS Feb 6 at 9:56
• Your write-up is a bit confusing: On the one hand, it appears that you use BibTeX to create the formatted bibliography. On the other hand, you appear to be referring to "manually editing in thebibliography enviroment"; to me, this expression seems to indicate that the thebibliography environment was (is?) created by hand. Please clarify which of two possibilities applies. – Mico Feb 6 at 12:48

## 1 Answer

Ready! The solution was quite simple (a friend of mine told me). The reason, .bblwas not being made based on the bibliography style chosen. This because, indeed, bibtex was unable to find the styles! So, I was just not correctly routing to the .bst files in the correct folder.

The elsarticle template provides .bst files for creating the bibliography style. What I have done it was just create a new folder (p.e. /bibstyles/) next to my .tex with all .bst files inside. Then, all the codes refering to these files where set as follows:

%% Numbered
%\bibliographystyle{bibstyles/model1-num-names}

%% Numbered without titles
%\bibliographystyle{bibstyles/model1a-num-names}

%% Harvard
%\bibliographystyle{bibstyles/model2-names}\biboptions{square,sort,comma,authoryear}

%% Vancouver numbered
%\usepackage{numcompress}\bibliographystyle{bibstyles/model3-num-names}

%% Vancouver name/year
\usepackage{numcompress}\bibliographystyle{bibstyles/model4-names}\biboptions{square,sort,comma,authoryear}

%% APA style
%\bibliographystyle{bibstyles/model5-names}\biboptions{square,sort,comma,authoryear}

%% AMA style
%\usepackage{numcompress}\bibliographystyle{bibstyles/model6-num-names}

%% Elsevier LaTeX' style
%\bibliographystyle{bibstyles/elsarticle-num}


Thus, I just had to delete the old compilation files (.bbl,.aux,.blg,.fff,.lof,.log,.lot,.out,.spl,.synctex.gz,.ttt) and compile again. Like this, we can be sure of creating a new .bblfile based on the new bibliography style. (Contrary, we will be always using the previous and unwanted file).

Somehow, it was not working with the .bblfiles directly next to .tex file. But inmediatly I did what I explained, it did work.

Thanks to all who submitted an answer! ;)