[Tex/LaTex] How to use chapterbib package: syntax


I have read the documentation but I need a complete syntax for using chapterbib for global and chapterwise bibliography (not sectionwise) . It's very confusing at different posts and it does not work for me. It will be a great help if someone can tell me the complete steps to use it. Like \usepackage {chapterbib}.

Best Answer

Chapterbib works on the \include commands. Here's a MWE:

Master file (e.g. Master.tex):


%% Hack to build a MWE
    author  = "George D. Greenwade",
    title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
    year    = "1993",
    journal = "TUGBoat",
    volume  = "14",
    number  = "3",
    pages   = "342--351"
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The LaTeX Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
%% End of hack


Content of Chapter1.tex:

One may cite \cite{greenwade93}.

Content of Chapter2.tex:

As detailed in~\cite{goossens93}...


Since a bibliography is generated for each chapter, one may compile each one of them with bibtex. In our case:

pdflatex Master
bibtex Chapter1
bibtex Chapter2
pdflatex Master
pdflatex Master

Overall bibliography

If you want to sum up all entries used in the document, you need to add the following lines in your Master file:




Note that the first need to be called before any \include command. In addition, you need to compile the Master file with bibtex as well.

Note: the hack is taken from this example.