For some hours now, I am trying to get the chapterbib-package for Latex to work on a simple example document. I feel like stupid - but I don't seem to find what stops this from working. I would be very grateful for any help with this!
So, here is my simple, but still non-working example; lets begin with the main document, "test.tex":
Code: Select all
% test file for chapterbib
\documentclass{book}
% the packages:
\usepackage[numbers]{natbib}
%\usepackage{chapterbib} % if the comment sign ("%") is removed (so that this package is being used), the citations marks in the text appear as "[? ]" instead of "[X]" (where "X" is the number for the citation in the bibliography)
\begin{document}
\include{subfolder/filia}
\include{subfolder2/filia2}
\end{document}
Also, I hope You see that I have two filial documents that I read in with the include-command from the subfolders "subfolder" and "subfolder2". Those documents are very simple:
filia.tex looks as this:
Code: Select all
%!TEX root = ../test.tex
\chapter{Math} \label{chapmath}
First Citation: \cite{Pletser1}.
Just another citation: \cite{lin1973}
\bibliographystyle{plain}
\bibliography{biblio}
Code: Select all
%!TEX root = ../test.tex
\chapter{Second Chapter} \label{chapSec}
Nothing here - just some dummy text. \cite{blabla3}
% \bibliographystyle{plain}
% \bibliography{biblio2}
Now, the two bibliography files "biblio.bib" and "biblio2.bib", which - as the example is written - need to be put into the main folder (the one containing "test.tex"):
biblio.bib:
Code: Select all
@article{Pletser1,
author = "Pletser, Vladimir and Huylenbrouck, Dirk",
title = "{The Ishango Artefact: the Missing Base 12 Link}",
journal = "Forma",
volume= "14",
pages = {339-346},
year = 1999
}
@article{lin1973,
author = "Shen Lin and Brian W. Kernighan",
title = "An Effective Heuristic Algorithm for the Travelling-Salesman Problem",
journal = "Operations Research",
volume = "21",
year = 1973,
pages = {498-516}
}
Code: Select all
@article{blabla3,
author = "Test, Tester",
title = "{Hmmmm....}",
journal = "Journal of Advanced Advances",
volume= "1",
pages = {1-111},
year = 2009
}
Okay. Now comes the problem: as soon as I remove the comment for the "\include{chapterbib}"-command, and run the Latex-Bibtex-Latex-Latex sequence, I run into trouble: although the bibliography is still produced at the end of the first chapter, the citation marks in the text do not show the correct reference numbers anymore (i.e., "[X]", where X is a number) - instead we only find empty dummy placeholders ("[? ]").
This is the place where I stopped; reading in the second bibliography for the second chapter didn't change anything about this for me (in fact, it gives an error message that the item cited from this bibliography is unknown). Anyway, I do not believe that this (the second bibliography not being read in) is likely to be the cause for the problem I find with the empty dummy placeholders for the citations. Instead, I believe that there is something wrong with the way how I use the chapterbib-package. Could anyone with some more experience with this package please have a look at the example and give me some helpful hints?
Thank You for reading and considering my question! With kind regards,
Björn