# number and author year style in a single file with natbib package

Is it possible to get both the numbered and the author-year citation style in a single book by using the natbib package?

I need one chapter with numbered and another chapter with author-year style. Is it possible to get the output by using the natbib package?

• Why both styles in the same book? – Aradnix Oct 29 '14 at 4:19
• Will there be a separate bibliography for each chapter? – Mico Dec 31 '14 at 13:27
• Is the natbib package mandatory or is another package also fine? – cryingshadow Jan 1 '15 at 13:12
• Which journal is it? Journals do not do this. A journal has a style and authors' articles are laid out according to that style so that the finished product has a consistent look. Similarly, most book publishers have standard styles they use. Certainly, a single style would be used for all chapters in an anthology, and usually for all books in a series or whatever. – cfr Jan 2 '15 at 3:36
• You need to use a package to support the production of multiple bibliographies. – cfr Jan 2 '15 at 3:51

This uses Alan Munn's suggestion in a comment on the question. I'd tried chapterbib before but got errors, even using the documentation for natbib. However, experimentation suggests the following should work:

\begin{filecontents}{f1.tex}
\chapter{A chapter}
\bibliographystyle{plainnat}
\citestyle{plainnat}
References to an article, \cite{article-full},
and to an entire journal, which appears
only in the references\nocite{whole-journal}.
\bibliography{xampl}
\end{filecontents}
\begin{filecontents}{f2.tex}
\chapter{Another chapter}
\bibliographystyle{plainnat}
\citestyle{plain}
A new chapter with a different style and a cite
of some possibly interesting proceedings, \cite{proceedings-full}.
\bibliography{xampl}
\end{filecontents}
\documentclass[openany]{book}
\usepackage{chapterbib}
\usepackage[sectionbib]{natbib}
\begin{document}
\include{f1}
\include{f2}
\end{document}


Note that various things seem to be crucial here. In particular, you need to issue \citestyle{} which was not obvious to me from the documentation. In particular, you need to do this even when you want to use the plainnat style and even when you've just issued \bibliographystyle{plainnat}. At least, without this, I could not get the correct format to be used.