Reputation: 31
I am writing a paper in LAtex and using Springer macro package (svjour3 class). Requirement is: citations should be in the form of authoryear and sorted in alphabetical order.
My tex file looks like:
{
\documentclass[smallextended]{svjour3}
\usepackage{natbib}
\begin{document}
\title{abc}
\bibliographystyle{spbasic} % basic style, author-year citations
%\bibliographystyle{spmpsci} % mathematics and physical sciences
%\bibliographystyle{apa}
%bibliographystyle{spphys} % APS-like style for physics
%\bibliographystyle{plainnat}
\bibliography{review} % name your BibTeX data base
\end{document}
}
Still I am getting following errors:
{
Package natbib Error: Bibliography not compatible with author-year citations. ...mmand\NAT@force@numbers{}\NAT@force@numbers
}
Upvotes: 3
Views: 8694
Reputation: 136
You have to add:
\usepackage[numbers,sort&compress]{natbib}
and then add bibliography as:
\bibliographystyle{spbasic}
\bibliography{sample.bib}
That almost did it for me. I changed it to
\usepackage[sort&compress]{natbib}
in the preamble. Cited with
\citep{ReferenceXY}
and added my bib
\bibliographystyle{spbasic}
\bibliography{literature.bib}
Upvotes: 0
Reputation: 31
You have to add:
\usepackage[numbers,sort&compress]{natbib}
and then add bibliography as:
\bibliographystyle{spbasic}
\bibliography{sample.bib}
Upvotes: 3