[Tex/LaTex] Putting bibliographies at the end of each chapter

bibtexnatbibsubdividing

I have a project that requires that separate bibliographies be maintained for each chapter and that the references appear at the end of each chapter. I am using natbib and I know that I should be using

\usepackage{natbib}
\usepackage{chapterbib}

But I am having problems with the directory structure (I think). Here is my structure

Main directory
    book.tex
    abbr.bib (this incluses @string abbreviation definitions for journal names)
    ch1-directory
       ch1.tex
       ch1.bib
    ch2-directory
       ...

A minimal example of my book.tex file contents is as follows:

\documentclass{book}
\usepackage[square,sort]{natbib}
\usepackage{chapterbib}
\begin{document}
    \include{ch1-directory/ch1}
\end{document}

My ch1.tex file has the following at the very end:

\bibliographystyle{plainnat}
\bibliography{../abbr,ch01}

Bibtex'ing the book.tex file gives two errors:

I couldn't open database file ../publications.bib
---line 15 of file ch-1/ch01.aux
 : \bibdata{../abbr
 :                 ,ch01}
I'm skipping whatever remains of this command
I found no database files---while reading file book.aux
Warning--I didn't find a database entry for "Luhn:1958fk"
Warning--I didn't find a database entry for "Bertossi:2011uq"
Warning--I didn't find a database entry for "Deutch:2012kx"
Warning--I didn't find a database entry for "Carenini:2011vn"
Warning--I didn't find a database entry for "Armbrust:2010ys"

I wonder what I am doing wrong. I did find other discussions here about putting references at the end of chapters, but they do not have the nested directory structure that I have, and it seems that is the main problem.

Best Answer

Have you considered biblatex instead of natbib and chapterbib? Biblatex takes care of formatting, sorting and dividing up the bibliography by chapters. I used it for a book of mine, in which I also used per-chapter bibliographies. The corresponding clause from my preamble is

\usepackage[firstinits=true,
            bibencoding=inputenc,
            hyperref=auto,
            pagination=none,
            %style=standard,
            refsection=chapter]
{biblatex}

If I remember correctly, there is a

style=natbib

option that emulates the formatting style of the natbib package.