It seems that you want chapterwise bibliographies.
This can be done with bibunits
which works together with natbib
.
Just put \putbib
where you want the chapter bibliography and add the following to the preamble.
\let\stdthebibliography\thebibliography
\renewcommand{\thebibliography}{%
\let\section\subsection
\stdthebibliography}
\bibliographyunit[\section]
\bibliography*{\jobname}
\bibliographystyle*{plainnat}
This makes sure that you can use \putbib
in the \section
s; \bibliography*{\jobname}
specifies the .bib
source file while \bibliographystyle*{plainnat}
specifies the bibliography style (.bst
file)
\documentclass[american]{article}
\usepackage{babel}
\usepackage{natbib}
\usepackage{bibunits}
\let\stdthebibliography\thebibliography
\renewcommand{\thebibliography}{%
\let\section\subsection
\stdthebibliography}
\bibliographyunit[\section]
\bibliography*{\jobname}
\bibliographystyle*{plainnat}
\begin{filecontents}{\jobname.bib}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
pages = {1-5},
year = {2010},
}
@book{testbookt,
author = {Arnold Uthor},
title = {Long Book},
date = {1990},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
year = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\section{First section}
some text \citep{testart} more text more citations
\putbib
\section{Second section}
some text \citep{testonline} more text more citations
\putbib
\end{document}

You can also use biblatex
, biblatex
has a natbib
compatibility mode (see § 3.7.9, p.88, of the documentation).
For more about multiple bibliographies, see §3.6.4 and 3.11.3 of the biblatex
documentation.
Put this in your preamble
\usepackage[style=authoryear,backend=biber,natbib,refsection=section]{biblatex}
\addbibresource{\jobname.bib}
but do not load natbib
or other citation packages.
With refsection=section
every \section
is a refsection in its own right, so you can put \printbibliography[heading=subbibliography]
where you want the bibliography for that particluar section to go.
\documentclass[american]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber,natbib,refsection=section]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
pages = {1-5},
year = {2010},
}
@book{testbookt,
author = {Arnold Uthor},
title = {Long Book},
date = {1990},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
year = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\section{First section}
some text \citep{testart} more text more citations
\printbibliography[heading=subbibliography]
\section{Second section}
some text \citep{testonline} more text more citations
\printbibliography[heading=subbibliography]
\end{document}

References will not be generated as required because of the incorrect usage of \chapterbib
with natbib
. The correct usage is:
\usepackage[sectionbib]{natbib}
\usepackage{chapterbib}
When natbib
is not being used as the citation manager, the usage of \chapterbib
for references at the end of each chapter is:
\usepackage[sectionbib]{chapterbib}
This is the complete file to generate the list of references at the end of each chapter based on the code that was uploaded. A few commands from the original file are suppressed for convenience. To avoid getting orphan chapter headings I moved the \chapter
commands inside the included files. I also deleted the paths to the included
and bib
files for simplicity.
Remember to run the compiler (PDFLaTeX
) on the main file which will generate auxiliary (aux
) files for each included file. Then open each auxiliary file and run bibtex
on each of those files. This will generate bbl
files for each chapter. Then go back to the main file and rerun the compiler twice.
\documentclass[12pt, twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge}
%\newpagestyle{mystyle}
%{\sethead[\thepage][][\chaptertitle]{}{}{\thepage}}
%\pagestyle{mystyle}\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Don't use this %
%\usepackage[semicolon,round,sort&compress,sectionbib]{natbib} %
%\usepackage[sectionbib]{chapterbib} %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Replacement %
\usepackage[semicolon,round,sort&compress,sectionbib]{natbib} %
\usepackage{chapterbib} %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\usepackage{epstopdf}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{calc}
\usepackage{float}
\usepackage{indentfirst}
\usepackage{chronology}
\usepackage[toc,page]{appendix}
\usepackage{graphics}
\usepackage{color,soul}
\usepackage{tablefootnote}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{grffile}
\usepackage{soul}
\usepackage{longtable}
\usepackage{lscape}
\usepackage{url}
\usepackage{epsfig}
\graphicspath{ {images/} }
\usepackage{caption}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} % this was incomplete
\usepackage{filecontents}
% Create bib file for Introduction chapter
\begin{filecontents*}{bib0.bib}
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@book{acemoglu2012,
title={Why nations fail: the origins of power, prosperity and poverty},
author={Acemoglu, Daron and Robinson, James A and Woren, Dan},
volume={4},
year={2012},
publisher={SciELO Chile}
}
\end{filecontents*}
%
% Create bib file for chapter 1. Note that it is not a requirement to have different bib files for each chapter.
\begin{filecontents*}{bib1.bib}
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@article{ackerberg2006,
title={Structural identification of production functions},
author={Ackerberg, Daniel and Caves, Kevin and Frazer, Garth},
year={2006}
}
%
%Create Introduction
\end{filecontents*}
\begin{filecontents*}{chap0.tex}
\chapter{Introduction}
This is Chapter ``Introduction'' from included file chap0.tex. \\
This is a citation for \cite{acemoglu2000} from bib0. \\
\citep{acemoglu2012} is a citation for the second reference. \\
The Reference list for introductory chapter appears next. \\
\bibliographystyle{apalike}
\bibliography{bib0}
\end{filecontents*}
%
% Create Chapter 1
\begin{filecontents*}{chap1.tex}
\chapter{chap1}
This is Chapter 1 from included file chap1.tex. \\
This is a citation for \cite{acemoglu2000} from bib1. \\
\citep{ackerberg2006} is a citation for the second reference. \\
The Reference list for the chapter appears next. \\
\bibliographystyle{apalike}
\bibliography{bib1}
\end{filecontents*}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Suppress content not required for this solution %
%\include{chapters/titlepage} %
% %
%\mainmatter %
%\tableofcontents %
%\listoffigures %
%\listoftables %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{chap0}
\include{chap1}
\end{document}


Best Answer
You may want to try using the
chapterbib
package. (There's also thebibunits
package, but since you state that your chapters are contained in separate.tex
files, it may be easiest to proceed with thechapterbib
package.) This package is designed to create bibliographies separately for each chapter, regardless of the number of bib files you have.The following MWE demonstrates the usage of this package with a very basic setup. It loads the packages
natbib
,chapterbib
,hyperref
, andbackref
as well as the bibliography style fileplainnat.bst
. The filedemo.bib
contains:The "chapter" files
demo-1.tex
,demo-2.tex
, anddemo-3.tex
each contain (they're identical):(Note that each chapter issues two citation calls.) The overall driver file,
demo.tex
, contains:Run (pdf)latex twice on
demo.tex
; run bibtex once each ondemo1.tex
,demo2.tex
, anddemo3.tex
; and run (pdf)latex twice more ondemo.tex
. The compiled document,demo.pdf
, should contain 11 pages (4 pages each for chapters 1 and 2, and 3 pages for chapter 3). The typeset bibliography of chapter 3, on page 11, looks like this:The back references for the bibliographies of chapters 1 and 2 should be "pages 1, 2" and "pages 5, 6", respectively.
You can, of course, adjust the appearance of the back references; see the manual of the
backref
package for details.