vtex-soft / texsupport.ims-aos

LaTeX author support files for IMS journal AOS.
https://vtex-soft.github.io/texsupport.ims-aos/
MIT License
6 stars 4 forks source link

Package natbib Error: Bibliography not compatible with author-year citations.(natbib) #4

Open SeunghyeonTonyYu opened 1 year ago

SeunghyeonTonyYu commented 1 year ago

In the aos-sample.tex file, I just uncomment as follows:

%% Packages
\RequirePackage{amsthm,amsmath,amsfonts,amssymb}
%\RequirePackage[numbers]{natbib}
\RequirePackage[authoryear]{natbib}%% uncomment this for author-year citations
\RequirePackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\RequirePackage{graphicx}

but it gives the following error:

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

It should be done if it is correct, but I'm not sure why this is happening.

Please let me know how to resolve this.

Thanks!

Tony

lstonys commented 1 year ago

At the and of sample file there is a numbered style bibliography. You should remove it. For authoryear bibliography \bibitem must have optional parameter:

% numbered
\bibitem{r1}

% authoryear
\bibitem[\protect\citeauthoryear{Author}{2023}]{r1}

Package contains imsart-nameyear.bst which creates authoryear bibliography.