[texhax] i'm using natbib and chapterbib but cannot get thebibliographies to appear in separate chapters of the book?any ideas?

Steve Schwartz s.schwartz at imperial.ac.uk
Sat Feb 5 18:23:22 CET 2005


Well, I think I know what Ludwig wants to do, and here's a recipe, based
on a book we've just finished. We failed to use chapterbib (I forget
whether there was some interference with the style files imposed by the
publisher or whatever). Anyway:

1  You need a master .tex file for the whole book which sets everything
up. It should have:
\usepackage[sectionbib]{natbib} somewhere (I forget exactly what the
sectionbib option does).

2  In that master, you need to \include (NOT \input) each chapter.tex
file (these chapter.tex files can \input subsections if they wish). The
point here is that each \include'd file will generate its own .aux file.
Each of these chapter.tex files has to declare its bibliographystyle,
bibliography, AND \input its .bbl file, so they will look like:

% this is chapterone.tex
... % can \input files of sections, etc. here
\bibliographystyle{...}
\bibliography{...}   % bib file
\input{chapterone.bbl} % this will fail the 1st run through. Better is:

\IfFileExists{chapterone.bbl}{\input{chapterone.bbl}}{\typeout{chapterone.bbl not found; run bibtex chapterone}

3  latex as (we used pdflatex to generate a nice, hyper-ref'ed book)

latex master.tex
bibtex chapterone  % this will generate a .bbl with only chapterone refs
bibtex chaptertwo
... etc.
latex master.tex
latex master.tex

NOTE: Do NOT run bibtex on master, as that will generate .bbl's which
contain all the references for the book in each chapter!

This is not a perfect solution. You may find that latex gives you lots
of warnings about multiply-defined citations (because the same keys may
appear in different chapters if you use a common .bib file).

There may be/should be/probably are other more elegant ways, but this
will work. It may also give you clues as to what you might be doing
wrong at present with your attempts using chapterbib.

HTH,
Steve


On Sat, 2005-02-05 at 16:11, Philip G. Ratcliffe wrote:
> Subject: [texhax] i'm using natbib and chapterbib but cannot get
> thebibliographies to appear in separate chapters of the book?any ideas?
> 
> Novel way of writing e-mail!  Anyway, it's a little hard to help with no
> example of exactly what you're doing.
> 
> Cordialmente,  Philip G. Ratcliffe
> _________________________________________
> 
> Professor of Nuclear & Subnuclear Physics
> Dipartimento di Fisica e Matematica
> Università degli Studi dell'Insubria
> via Valleggio 11
> 22100 Como (CO)
> Italy
> 
> Tel. +39 (031) 238.6231
> Fax  +39 (031) 238.6119
> Cell +39 (340) 2346580
> Web  http://www.unico.it/~pgr
> 
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> TeX newsgroup: http://groups.google.com/groups?group=comp.text.tex
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz       Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics     Fax:   +44-(0)20-7594-7772
The Blackett Laboratory           E-mail: s.schwartz at imperial.ac.uk
Imperial College London           Office: Huxley 6M70 
London SW7 2AZ, U.K.              Web: http://www.sp.ph.ic.ac.uk/
+-------------------------------------------------------------------+



More information about the texhax mailing list
http://tug.org/pipermail/texhax/2005-February/003480.html
tug.org
crawl=CC-MAIN-2018-05
7470
application/http; msgtype=response
sha1:Q3HQAM3LTT4IEBWDQWBIO5BH5PONO46T
<urn:uuid:7a0b0fa7-844b-48ab-85e4-febb7e837481>
2018-01-17T20:25:57Z
91.121.174.77
text/html
sha1:LNEK3MG4LRDH4JZB264OHSNMX3DPOOGV
<urn:uuid:d5ab260d-a883-493a-bf75-efe10b0ddef9>
http://tug.org/pipermail/texhax/2005-February/003480.html
response
<urn:uuid:aecad0c4-53d0-4899-91d4-be1821fc2343>
robots: classic
hostname: ip-10-47-186-155.ec2.internal
software: Nutch 1.6 (CC)
isPartOf: CC-MAIN-2018-05
operator: Common Crawl Admin
description: Wide crawl of the web for January 2018
publisher: Common Crawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf