[Tex/LaTex] Chapterbib gives ‘citation undefined’ and all [?]


This is my first time posting. I have been struggling to include reference lists after each chapter included in my main .tex file. Though the .bbl file includes all the references, all the citations appear as [?] and no reference list is produced. I have run pdflatex, bibtex, pdflatex, pdflatex. I have tried using one .bib file and creating separate ones for each chapter. I know the .bib file is fine, because I initially had all the writing in the main file, but hadn't put in all the chapters and it compiled fine. When I added the second chapter I realized I needed to use \include{chap} to get separate lists.

Here is an example of my main file:


\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}







Here is an example of a chapter (the others are similar):

\chapter{Surface Energy Balance}

Text \citet{Paterson10}.


And the .bib entry:

    Author = {K. M. Cuffey and W. S. B. Paterson},
    Date-Added = {2015-06-01 15:34:50 +0000},
    Date-Modified = {2015-06-01 15:35:53 +0000},
    Publisher = {Academic Press},
    Title = {Physics of {G}laciers},
    Year = {2010}}

Best Answer

Since you are using natbib, you need specify its sectionbib option: \usepackage[sectionbib]{natbib}. Run pdflatex on the main file, which will generate aux files for each chapter. As @moewe indicates, open each aux file and run Bibtex on each of those files. This will generate bbl files for each chapter. Then rerun pdflatex of the main file. With the suggested change, your code works for me.

Related Question