Bibliographies biblio.mod.xsl

- SourceForge
- Home Page
- Samples

- Reference Contents |
- Download & Install |
- User Guides |
- Notes, E-mail & Bugs |
- Q&A

Suggestions
Search:
Next: latex.preamble.essential.biblio
Previous: authorinitials

Reference Section

# Bibliographies `biblio.mod.xsl`

### Ramon Casellas

### James Devenish

$Id: biblio.mod.xsl,v 1.21 2004/01/26 08:57:46 j-devenish Exp $

Copyright © 2000, 2001, 2002, 2003 Ramon Casellas

Revision History
Revision 1.16 | May-January 2004 |
Major review of documentation.

The file `biblio.mod.xsl` contains the XSL template for `bibliography` [2.0.9] and associated elements.

## “All” versus “cited” mode

### Note

These modes are superseded by BibTeX when using BibTeX.

The latex.biblio.output option can be used to select “all” mode or “cited” mode. With the “cited” mode, only the `biblioentries` [2.0.9] that have been cited somewhere in the document are output. Otherwise (in “all” mode) all biblioentries found are output (as the HTML stylesheets do).

## DocBook versus BibTeX

DB2LaTeX supports BibTeX. When this mode is enabled, you can use a BibTeX citations file. Your `citations` [2.0.9] can then refer to your BibTeX keys (`xrefs` [2.0.9] are unlikely to work, though). You will need to provide a LaTeX command to select a bibliographic citation style as is normal for BibTeX (see Example 2, “Using BibTeX with DB2LaTeX”). You must also run the bibtex command when typesetting your document with LaTeX.

### Note

Although DocBook allows `bibliographies` [2.0.9] within a number of components, such as `section` [2.0.9], the use of BibTeX is only useful for a single, chapter-level bibliography.

To enable BibTeX mode, insert an empty `bibliography` [2.0.9] element in your DocBook document. However, note that this is not valid DocBook, though it will lead to the desired results with most DocBook XSL stylesheets (including those for HTML). You will also need to set the latex.bibfiles variable to the correct path of your BibTeX citations file. Alternatively, you may choose to use a processing instruction named “bibtex-bibliography” instead of an empty element. The name of the citations file may be specified within the processing instruction or via latex.bibfiles (see Example 2, “Using BibTeX with DB2LaTeX”).

Example 2. Using BibTeX with DB2LaTeX

A BibTeX bibliography may be enabled by providing the name of your citations file, the name of a BibTeX style, and the insertion of an appropriate node in your DocBook document. In your customisation layer:

    <xsl:variable name="latex.book.preamble.post">
    % Your LaTeX customisation commands
    \bibliographystyle{ieeetr}
    </xsl:variable>
    <xsl:variable name="latex.bibfiles" select="'../citations.bib'"/>

Then, in your document, type this:

    <bibliography/>

Although this is not valid according to the DocBook DTD, it will work with most stylesheets (not just DB2LaTeX). Alternatively, you may instead use a processing instruction in compliance with the DTD, though this will work only with DB2LaTeX and you will not be able to specify a custom `title` [2.0.9] for your bibliography:

    <?bibtex-bibliography?>

You may optionally specify the citations file directly (you will not need to set `latex.bibfiles`):

    <?bibtex-bibliography ../citations.bib?>

## 1. Pertinent Variables

- latex.bibfiles
- latex.biblio.output

Prev | Up | Next
authorinitials | Home | latex.preamble.essential.biblio