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

Ludwig Chincarini chincarinil at hotmail.com
Mon Feb 7 17:21:52 CET 2005

This is beautiful, except when I use:



Could you send me your "MASTER.TEX" file so I can check it versus mine?
Also a sample chapter file?

----- Original Message ----- 
From: "Steve Schwartz" <s.schwartz at imperial.ac.uk>
To: <philip.ratcliffe at uninsubria.it>
Cc: "Ludwig Chincarini" <chincarinil at hotmail.com>; <texhax at tug.org>
Sent: Monday, February 07, 2005 11:17 AM
Subject: RE: [texhax] i'm using natbib and chapterbib but 
cannotgetthebibliographies to appear in separate chapters of the book?any 


Thanks for confirming my suspicion that there is a more elegant way than
the one I posted to Ludwig.

As I said at the very beginning of all this, there was some reason why
we tried and failed to use chapterbib for our book (I think it was a
clash with kluwer's style files somewhere) which is why we came up with
the workaround I've now posted to the world in all its gory detail. At
least it works (and you've even suggested an occasion where it would
need to be done that way, though we DID have bibliographies at the end
of each chapter).

I can well imagine that my \input of the .bbl's is superfluous if
chapterbib is used correctly (that would seem to be the point of writing
a package called chapterbib). I'll read the docs when (if) I ever have
to write another book.


On Mon, 2005-02-07 at 15:52, Philip G. Ratcliffe wrote:
> Uhm, I have a query here:
> > 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).
> Right, but, as I noted in my other reply, you need
> \usepackage[sectionbib]{chapterbib} too.
> > 2  In that master, you need to \include (NOT \input) each chapter.tex
> > [snip]
> > 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
> So far so good.  But ...
> > \input{chapterone.bbl} % this will fail the 1st run through. Better is:
> >
> > \IfFileExists{chapterone.bbl}{\input{chapterone.bbl}}{\typeout{cha
> > pterone.bbl not found; run bibtex chapterone}
> This is superfluous if you use chapterbib the right way.  I can only 
> guess,
> but maybe you had ALL of the bibliography at the END of the book in 
> separate
> units.  In that case I imagine this is the only way too do it.  Although I
> think (but I don't know for sure) that the bibunits paskage may possible
> offer a more elegant solution.
> 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
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