I am trying to compile a thesis in LaTeX and I need to put in References after each chapter. I have spend hours trying to get chapterbib to work, but I can't get it right.
Can anyone give a good example how to solve this problem? My current structure, cleaned of the formatting code, is this:
Code: Select all
\documentclass[phd,tocprelim]{CU}
\usepackage[sectionbib]{chapterbib}
%\bibliographystyle{plain}
%\bibliographystyle{IEEEbib}
\begin{document}
\include{chapter1/thesis-chapter1}
\include{chapter2/thesis-chapter2}
\include{chapter3/thesis-chapter3}
\end{document}
Code: Select all
\chapter{Introduction}
\section{SECTION 1}
The text for Section 1 goes here, without brackets.
test \cite{Brakenridge1994}
\bibliographystyle{plain}
\bibliography{chapter1/thesis-chapter1}
Code: Select all
@article{Brakenridge1994,
Author = {Brakenridge, G.B. and Knox, J.C. and Paylor II, E.D. and Magiligan, F.},
Title = {Radar Remote Sensing Aids Study of the Great Flood of 1993},
Journal = {EOS},
Volume = {75},
Number = {45},
Pages = {521-530},
Year = {1994}
}
For a test, I set up chapter 2 identical to chapter 1, but citing
Code: Select all
\cite{Barber1996}
In chapter 3, I want to cite by \cite{awe}, which is the only reference in "thesis-chapter3.bib".
A number of web pages suggest that you need to compile as follows
Code: Select all
latex Thesis.tex
bibtex thesis-chapter1.tex
bibtex thesis-chapter2.tex
bibtex thesis-chapter3.tex
latex Thesis.tex
latex Thesis.tex
Code: Select all
A level-1 auxiliary file: chapter2/thesis-chapter2.aux
Illegal, another \bibstyle command---line 8 of file chapter2/thesis-chapter2.aux
: \bibstyle
: {plain}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 9 of file chapter2/thesis-chapter2.aux
: \bibdata
: {chapter2/thesis-chapter2}
I'm skipping whatever remains of this command
A level-1 auxiliary file: chapter3/thesis-chapter3.aux
Illegal, another \bibstyle command---line 8 of file chapter3/thesis-chapter3.aux
: \bibstyle
: {plain}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 9 of file chapter3/thesis-chapter3.aux
: \bibdata
: {chapter3/thesis-chapter3}
I'm skipping whatever remains of this command
Database file #1: chapter1/thesis-chapter1.bib
Warning--I dind't find a database entry for "Barber1996"
There are a few comments on this topics on the web, but I can't get it to work.
Any help is greatly appreciated.