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}}
Best Answer
The
sectionbib
ofnatbib
replaces thesectionbib
option ofchapterbib
, but not the entire package.To get a bibliography after every chapter, you still have to load
chapterbib
too:You do not need the
sectionbib
option because it is incompatible withscrreprt
. A workaround can be found at sectionbib option for natbib doesn't work with scrreprt: Change your chapters toRemember that with
chapterbib
, you have to runbibtex
for every chapter.