Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SeunghyeonTonyYu opened this issue Apr 30, 2023 · 1 comment

Comments

@SeunghyeonTonyYu
Copy link

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
Copy link

lstonys commented May 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants