Archive for bibpunct

Natbib error

Posted in Statistics, University life with tags , , , on July 21, 2011 by xi'an

When compiling my papers with the PNAS options,

\documentclass{pnastwo}
\usepackage{amssymb,amsfonts,amsmath}
\usepackage[numbers,round]{natbib}
\bibpunct{(}{)}{,}{a}{,}{,}
\bibliographystyle{pnas}

I would get a compilation error

! Package natbib Error: Bibliography not compatible with author-year citations.
(natbib) Press  <return> to continue in numerical citation style.
See the natbib package documentation for explanation.

that was quite minor (just press <return>!) but nonetheless annoying. This seemed to be due to the latest version of natbib. I eventually found a solution by Ulrike Fisher on this forum, namely to replace {a} with {n} in the above \bibpunct line.

\bibpunct{(}{)}{,}{n}{,}{,}
%d bloggers like this: