%xsldoc.ent; ]> $Id: biblio.mod.xsl,v 1.21 2004/01/26 08:57:46 j-devenish Exp $ &ramon; &james; 2000200120022003 Ramon Casellas &rev_2003_05; Bibliographies <filename>biblio.mod.xsl</filename> The file biblio.mod.xsl contains the XSL template for bibliography and associated elements. All versus cited mode These modes are superseded by &BibTeX; when using &BibTeX;. The option can be used to select all mode or cited mode. With the cited mode, only the biblioentries 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 can then refer to your &BibTeX; keys (xrefs 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 ). You must also run the bibtex command when typesetting your document with &LaTeX;. Although &DocBook; allows bibliographies within a number of components, such as section, the use of &BibTeX; is only useful for a single, chapter-level bibliography. To enable &BibTeX; mode, insert an empty bibliography 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 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 (see ). 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: % Your LaTeX customisation commands \bibliographystyle{ieeetr} ]]> Then, in your document, type this: ]]> 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 for your bibliography: ]]> You may optionally specify the citations file directly (you will not need to set latex.bibfiles): ]]> Essential preamble for biblio.mod.xsl support Defines docbooktolatexbibname, docbooktolatexbibaux and docbooktolatexbibliography. &preamble; Process bibliography elements This is a complex template that can format bibliographies as chapter-level or section-level components. makechapter Whether to make a chapter-level bibliography or not. This is normally determined by examining whether the bibliography element occurs as a child of a book or part. If so, the bibliography will be formatted as an unnumbered chapter. If not, the bibliography will be formatted as an unnumbered section. This effect does not hold for &BibTeX; bibliographies, which will be formatted by the &LaTeX; bibliography command. This template probably contains many bugs. &essential_preamble; &test_article; &test_biblio; &test_bind; &test_book; &test_cited; &test_ieeebiblio; &mapping;: this template will use the bibliography-chapter and bibliography-section mappings. bibliography-chapter bibliography-section thebibliography docbooktolatexbibliography \let\oldbibname\bibname \let\oldrefname\refname \def\bibname{ } \let\refname\bibname DB2LaTeX: Bibliographic Output Mode : \chapter*{\docbooktolatexbibnamex}\hypertarget{ }{} \section*{\docbooktolatexbibnamex}\hypertarget{ }{} \begin{ }{ }{\ chapter section }{ \docbooktolatexbibname }\hypertarget{ }{} \end{ } \hypertarget{ }{} \chapter* \section* {\docbooktolatexbibnamex}\hypertarget{ }{} % Assume that an empty <bibliography> means ``use BibTeX'' or similar. \bibliography{} \let\bibname\oldbibname \let\refname\oldrefname Process bibtex-bibliography nodes Output a &BibTeX; bibliography. makechapter Choose which &LaTeX; mapping to use. This is normally determined by examining whether the PI occurs as a child of a book or part. Regardless of this parameter, the bibliography will be formatted as a chapter via the &LaTeX; bibliography command. filename The filename of the &BibTeX; citations source file. By default, this will be obtained from the content of the process instruction, if present, or otherwise from . This PI is not part of &DocBook; and is only supported by &DB2LaTeX; The formatting of the bibliography is performed by &LaTeX; and is not configurable by &DB2LaTeX;. &mapping;: This template will use the bibliography-chapter or bibliography-section mapping. bibliography-chapter bibliography-section \bibliography{} Process bibliodiv elements Formats subdivisions of bibliographies. &essential_preamble; &test_article; &test_biblio; &test_bind; &test_book; &test_cited; &test_ieeebiblio; docbooktolatexbibliography thebibliography \begin{docbooktolatexbibliography}{ }{\ subsection }{ }\hypertarget{ }{} \end{docbooktolatexbibliography} Process biblioentry elements Emits a bibiographic entry if the reference was cited in the document. This template calls to format the entry. Process biblioentry elements Emits a bibiographic entry unconditionally. This template calls to format the entry. Process biblioentry elements Emits a bibiographic entry unconditionally. This template calls to format the entry. Format biblioentries Formats a bibiographic entry. This template does not apply to &BibTeX; bibliographies. A bibitem is emitted. If can be linked via citation or xref. The title will be formatted in italics, followed by , the author or authorgroup, and then the following elements separated by biblioentry.item.separator: copyright, publisher, pubdate, pagenums, isbn, editor, releaseinfo. All templates for all &DocBook; elements will be applied with the bibliography.mode XSLT mode. &test_article; &test_biblio; &test_bind; &test_book; &test_cited; &test_ieeebiblio; % -------------- biblioentry \bibitem { }\docbooktolatexbibaux{ }{ } \hypertarget{ } \emph{ } . % -------------- biblioentry \bibitem \bibitem[{ }] { }\docbooktolatexbibaux{ }{ } \hypertarget{ }{\emph{ }} . copyright ,