You may want to try using the chapterbib
package. (There's also the bibunits
package, but since you state that your chapters are contained in separate .tex
files, it may be easiest to proceed with the chapterbib
package.) This package is designed to create bibliographies separately for each chapter, regardless of the number of bib files you have.
The following MWE demonstrates the usage of this package with a very basic setup. It loads the packages natbib
, chapterbib
, hyperref
, and backref
as well as the bibliography style file plainnat.bst
. The file demo.bib
contains:
@article{abadir:1993a,
author = "Karim M. Abadir",
title = "{OLS} bias in a nonstationary autoregression",
journal = "Econometric Theory",
year = 1993,
volume = 9,
number = 1,
pages = "81--93"
}
The "chapter" files demo-1.tex
, demo-2.tex
, and demo-3.tex
each contain (they're identical):
\chapter{Hello}
\citet{abadir:1993a}\clearpage\citet{abadir:1993a}
\bibliographystyle{plainnat}
\bibliography{demo}
(Note that each chapter issues two citation calls.) The overall driver file, demo.tex
, contains:
\documentclass{book}
\usepackage{natbib,chapterbib,hyperref,backref}
\begin{document}
\include{demo-1}
\include{demo-2}
\include{demo-3}
\end{document}
Run (pdf)latex twice on demo.tex
; run bibtex once each on demo1.tex
, demo2.tex
, and demo3.tex
; and run (pdf)latex twice more on demo.tex
. The compiled document, demo.pdf
, should contain 11 pages (4 pages each for chapters 1 and 2, and 3 pages for chapter 3). The typeset bibliography of chapter 3, on page 11, looks like this:
The back references for the bibliographies of chapters 1 and 2 should be "pages 1, 2" and "pages 5, 6", respectively.
You can, of course, adjust the appearance of the back references; see the manual of the backref
package for details.
Here's a biblatex
solution that satisfies your main requirement -- a combination of local bibliographies and a global one, with congruent local/global entry labels. However, instead of individual .bib
files for each section I use a global file including special keywords
fields to indicate an entry's affiliation with one or several sections.
\documentclass{article}
\usepackage[style=alphabetic]{biblatex}
\defbibheading{subbibforsec}[\refname\ for section~\thesection]{%
\subsection*{#1}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
keywords = {foo,bar},
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02x,
keywords = {foo},
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
@misc{B02y,
keywords = {bar},
author = {Buthor, B.},
year = {2002},
title = {Bravissimo},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\section{Foo}
Some text \autocite{B02x}.
\printbibliography[heading=subbibforsec,keyword=foo]
\section{Bar}
Some text \autocite{B02y}.
\printbibliography[heading=subbibforsec,keyword=bar]
\printbibliography
\end{document}
Best Answer
A quick and dirty hack method would be to use the "text after" option of the cite and citep[][]{} commands to add the "a" and "b" in the initial reference in the text and use the notes field in the bibliography to provide the "a" and "b" clarification. That systenm should work, although it is quite clunky and depending on how often you have the case you described, a better solution probably is possible.
So in your text, you would use
and in your bib file in the notes field provide "a. pp 127-139, b. pp140-141"
as the notes filed usually gets rendered last, but before a possible hyperref backref, this should appear at the right place. But it might be the case that it doesn't appear in a new line. That's for someone else to figure out ;-)