1

I'm trying to change my bibliographystyle from unsrt to nar. However, pdflatex, bibtex , 2x pdflatex(using Texmaker) always gives me the following Error:

Package natbib Error: Bibliography not compatible with author-year citations. I tried to delete the bib and aux files, but it doesn't seem to work. I've got two *.bib files. One is created by Mendeley and one is created by me. This is an example of one of my entries:

@book{saleh,
  Author = {Bahaa E. A. Saleh and Malvin C. Teich},
  Title = {Fundamentals of Photonics (Wiley Series in Pure and Applied Optics)},
  Publisher = {John Wiley \& Sons},
  Year = {1991},
  ISBN = {0471839655},
  URL = {http://www.amazon.com/Fundamentals-Photonics-Series-Applied-Optics/dp/0471839655%3FSubscriptionId%3D0JYN1NVW651KCA56C102%26tag%3Dtechkie-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0471839655}
}

This is how I cite:

\cite{feyn}

It seems there are a lot of these questions, but all the proposed solutions don't work for me.

  • 1
    Have you tried loading the natbib package with the option numbers? Doing so will direct natbib to create numeric-style citation callouts. – Mico May 31 '14 at 9:37
  • That did the trick thanks. If you want to I would accept it as the right answer. – Stein May 31 '14 at 9:48
  • I've just posted the comment as an answer. :-) – Mico May 31 '14 at 9:57
3

It looks like the nar bibliography style is meant to be used with numeric-style (as opposed to, say, authoryear-style) citations. Thus, be sure to load the natbib package with the option numbers. (That package's default is to create authoryear-style citations.)

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{saleh,
  Author = {Bahaa E. A. Saleh and Malvin C. Teich},
  Title = {Fundamentals of Photonics (Wiley Series in Pure and Applied Optics)},
  Publisher = {John Wiley \& Sons},
  Address  = {New York},
  Year = {1991},
  ISBN = {0471839655},
  URL = {http://www.amazon.com/Fundamentals-Photonics-Series-Applied-Optics/dp/0471839655%3FSubscriptionId%3D0JYN1NVW651KCA56C102%26tag%3Dtechkie-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0471839655}
}
\end{filecontents*}
\bibliographystyle{nar}
\usepackage[numbers]{natbib}
\usepackage{url}
\begin{document}
\cite{saleh}
\bibliography{\jobname}
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.