# Sectionbib, natbib and separate bibliographies

I want a bibliography after each chapter in my thesis. Therefore I first used:

\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage[sectionbib]{chapterbib}


But I got some errors (like: reference x on page n undefined). In the natbib package description I have read that both cannot be used, but that the sectionbib option can be used in combination with the natbib package.

So now I have:

\usepackage[square, numbers, comma, sort&compress, sectionbib]{natbib}


This works fine (also by making the bibliography a section in the chapter, which I love). But now I have the complete list of references after each chapter, although each chapter has its own bib file.

My MWE

\documentclass[twoside,openright,numbers=endperiod,titlepage,headinclude,
footinclude=false,cleardoublepage=empty,abstractoff,
BCOR=5mm,b5paper,fontsize=11pt, american,
]{scrreprt}
\usepackage[square, numbers, comma, sort&compress, sectionbib]{natbib}

\begin{document}
\include{Chapters/Literature}
\end{document}


and for the chapters:

balaleafelj~\cite{1}.

\bibliographystyle{unsrtnat}
{\footnotesize
\bibliography{Chapters/outlookref}}

• Could you consider using biblatex . It is very easy to have bibliographies by section. – Bernard Mar 13 '18 at 14:27
• I would prefer not to – Brigitte Bruijns Mar 13 '18 at 14:36
• Please add a minimal working example with bibliography with Bibliography (MWEB) so that we can better help you. – Marcel Krüger Mar 13 '18 at 14:47
• I tried to add it (I am not sure how to get the correct lay-out) – Brigitte Bruijns Mar 13 '18 at 14:58
• You do still need \usepackage{chapterbib}, but without the sectionbib option. Then you need to run BibTeX separately on each included chapter. – Marijn Mar 13 '18 at 15:10

The sectionbib of natbib replaces the sectionbib option of chapterbib, but not the entire package.

To get a bibliography after every chapter, you still have to load chapterbib too:

\documentclass[twoside,openright,numbers=endperiod,titlepage,headinclude,
footinclude=false,cleardoublepage=empty,abstractoff,
BCOR=5mm,b5paper,fontsize=11pt, american,
]{scrreprt}
\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage{chapterbib}

\begin{document}
\include{Chapters/Literature}
\end{document}


You do not need the sectionbib option because it is incompatible with scrreprt. A workaround can be found at sectionbib option for natbib doesn't work with scrreprt: Change your chapters to

balaleafelj~\cite{1}.

\bibliographystyle{unsrtnat}
{\footnotesize \let\chapter\section
\bibliography{Chapters/outlookref}}


Remember that with chapterbib, you have to run bibtex for every chapter.