I'm using chapterbib package to generate a bibliography for each chapter. But the compilation fails.
Here is the content of my principal.tex file:
Code: Select all
\documentclass[phd]{theseUL}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
%\usepackage[french]{babel}
\usepackage{fancyhdr}
\usepackage{amsfonts}
\usepackage{url}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{color}
\usepackage{verbatim}
\usepackage{enumerate}
\usepackage{makeidx}
\usepackage{topcapt}
\usepackage{setspace}
\usepackage{rotfloat}
\usepackage[square,sort,comma, authoryear]{natbib}
\usepackage{chapterbib}
\begin{document}
\part{Contexte général et état de l'art}
\input{../chap1_introduction/chap1_introduction}
\input{../chap2_definitions/chap2_definitions}
\end{document}
Code: Select all
\chapter{Introduction} %%This is chapter 1
\phantomsection\addcontentsline{toc}{chapter}{Introduction}
Text
\bibliographystyle{authordate1}
\bibliography{principal}
Code: Select all
\chapter{Definition} %%This is chapter 2
\phantomsection\addcontentsline{toc}{chapter}{Definition}
Text
\bibliographystyle{authordate1}
\bibliography{principal}
pdflatex principal.tex (success)
pdflatex principal.tex (success)
bibtex principal (2 errors, I guess it is normal: see output #1)
bibtex ../chap1_introduction/chap1_introduction (see output #2)
bibtex ../chap2_definitions/chap2_definitions (see output #3)
pdflatex principal.tex
pdflatex principal.tex
Output #1
Code: Select all
XXXX@IFTEaigny2:~/Phd/principal$ bibtex principal
This is BibTeX, Version 0.99c (TeX Live 2009/Debian)
The top-level auxiliary file: principal.aux
The style file: authordate1.bst
Illegal, another \bibstyle command---line 51 of file principal.aux
: \bibstyle
: {authordate1}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 52 of file principal.aux
: \bibdata
: {principal}
I'm skipping whatever remains of this command
Database file #1: principal.bib
Warning--to sort, need author or key in GrownUpDigital2009
Warning--empty author in GrownUpDigital2009
Warning--empty journal in GrownUpDigital2009
Warning--empty journal in Torres2008
(There were 2 error messages)
Code: Select all
XXXX@IFTEaigny2:~/Phd/principal$ bibtex principal
This is BibTeX, Version 0.99c (TeX Live 2009/Debian)
The top-level auxiliary file: ../chap1_introduction/chap1_introduction.aux
The style file: authordate1.bst
I couldn't open database file chap1_introduction.bib
---line 43 of file ../chap1_introduction/chap1_introduction.aux
: \bibdata{chap1_introduction
: }
I'm skipping whatever remains of this command
I found no database files---while reading file ../chap1_introduction/chap1_introduction.aux
Warning--I didn't find a database entry for "Downes2005"
Warning--I didn't find a database entry for "Hadjerrouit2005"
Warning--I didn't find a database entry for "Hadjerrouit2007"
Warning--I didn't find a database entry for "Wilson2007"
Warning--I didn't find a database entry for "Seffah2002"
Warning--I didn't find a database entry for "Torres2008"
Warning--I didn't find a database entry for "Downes2004"
Warning--I didn't find a database entry for "GrownUpDigital2009"
(There were 2 error messages)
principal.bib is the entire citation databse for the whole document and is in /principal; so I have principal/principal.bib.
Should I compile the chapters bibtex from the chapter subdirectory, or from the principal subdirectory as I did? I tried both withe the same result.
Thank you.