|
Document 258
The LaTeX chapterbib package
Version: 3.x, 4.x, 5.x - Scientific WorkPlace & Scientific
Word
With the chapterbib package, you can create a BibTeX bibliography for each
file you include in your master document. If each chapter in the document is
included as a separate file, then each chapter can have its own bibliography.
Your document can contain multiple small BibTeX bibliographies as well as a
comprehensive BibTeX bibliography for the whole. You can also create a
bibliography for the whole document, such as a recommended reading list, that
is unrelated to cited works. The bibliography items can be cited in more than
one bibliography.
Your document requires several changes to use the chapterbib package. Each
included file must have its own \bibliographystyle
and \bibliography commands, as must the master
document if you want a bibliography for the whole document. Generally, to
generate the bibliographies you must typeset your document (one pass through
LaTeX), run BibTeX on each included file separately, and then typeset your
document again (two passes through LaTeX). The more complex your document, the
more complex the process. You must typeset compile your document from outside
SWP or SW.
Placing bibliographies at the end of each chapter with the
chapterbib package
-
Open the master document that contains your chapters.
-
Add the chapterbib package to your master document.
-
Scroll through the document to find any subdocuments in the document. Each
subdocument appears as a gray box labeled with the name of the subdocument.
-
Replace each subdocument object with a TeX field:
-
In Version 4.0 and later, from the Insert menu,
choose Typeset Object and then choose
TeX Field.
or
In earlier versions, from the Insert menu,
choose Field and then choose
TeX.
-
Check the Encapsulated box.
-
In the entry area, type \include{subdoc} where
subdoc is the name of the subdocument you want to
include. Don't use the .tex extension; LaTeX adds it automatically.
-
Choose OK.
-
If you are creating a comprehensive BibTeX bibliography for the whole
document, add a BibTeX field to the master document at the point where the
bibliography is to appear.
-
Save the master document.
-
For each subdocument that contains citations and will have a seperate
bibliography, add a BibTeX field at the point where the bibliography is to
appear.
-
Save each subdocument.
-
From outside SWP or SW, typeset compile the master document:
-
From the SWP or SW submenu on the Windows
Programs list, choose the TrueTeX Formatter.
-
Select the file and choose OK.
-
Open a command prompt.
-
Change the default directory to the document directory.
-
Enter this command line (note the space):
c:\swp55\tcitex\truetex\runpdflatex filename
LaTeX generates .aux files for each subdocument included by the master
document.
-
From outside SWP or SW, run BibTeX as necessary on the .aux file for each
subdocument and the master document:
-
In Version 4 and later:
-
Open a command prompt.
-
Enter these two commands separately to set the environments needed by the
BibTeX program to locate the bibliography style and database files (note the
space):
set BSTINPUTS=C:\swp55\TCITeX\bibtex\bst\\
set BIBINPUTS=C:\swp55\TCITeX\bibtex\bib\\
changing the program directory as necessary for your installation.
-
Use the cd command to change the command prompt
default directory to the document directory.
-
Run BibTeX by entering this command (note the space) where filename is the
name of a subdocument or master document:
c:\swp55\TCITeX\web2c\bibtex filename
changing the program directory as necessary for your installation.
-
Repeat the above step for all files that have a corresponding
.aux files.
-
In Version 3.5:
-
From the Windows Start menu, choose
Run.
-
In the Open box, type
c:\swp35\TCITeX\SWTools\bin\bibtex.exe and choose
OK.
Change the program directory name as necessary.
-
Specify the .aux file.
-
Choose Create.
BibTeX creates a .bbl file.
-
Choose OK.
-
In Version 3.0:
-
From the Windows Start menu, choose
Run.
-
In the Open box, type
c:\swp30\bibtex.exe and choose
OK.
Change the program directory name as necessary.
-
Specify the .aux file.
-
Choose Create.
BibTeX creates a .bbl file.
-
Choose OK.
-
From outside SWP or SW, typeset compile the master document at least twice
more (see step 9 above).
-
The final results can now be viewed.
-
If creating a DVI file, from inside SWP or SW, choose Preview from the
Typeset menu.
-
If creating a PDF file using Version 5.x, from inside SWP or SW, choose Preview PDF from
the Typeset menu.
Additional commands provide customized entries in a list of citations and
multiple bibliographies without using the \include command. With package
options you can repeat or gather all chapter bibliography entries at the end
of the document, create a bibliography for the entire document, and format the
bibliography title.
This package is compatible with the cite
and drftcite packages, all installed in the
TCITeX/TeX/LaTeX/contrib/cite directory.
Last revised 02/16/06
This document was created with Scientific WorkPlace.
|