Next / Previous / Contents / TCC Help System / NM Tech homepage

Abstract

Describes the customization of the DocBook Modular Stylesheets for the Tech Computer Center's standard styles.

This publication is available in Web form and also as a PDF document. Please forward any comments to tcc-doc@nmt.edu.

Table of Contents

1. Introduction
1.1. Bob Stayton's DocBook XSL: The complete guide
2. Online files
3. Skills you will need
4. What is a customization layer?
5. Overall structure of the local customization layer
6. Title page customization: XSLT that builds XSLT
7. tcc_html.xsl: HTML customization layer
7.1. HTML general page layout
7.2. HTML title page and table of contents
7.3. HTML headers and footers
7.3.1. The header.navigation template
7.3.2. The tcc.top.nav.bar template
7.3.3. The footer.navigation template
7.3.4. The tcc.bot.links template
7.3.5. The tcc.colophon template
7.3.6. The author.colophon.mode template
7.4. HTML section and subsection headings
7.5. HTML inline element customizations
7.5.1. The inline.italicsansseq template
7.5.2. The inline.smallcapsseq template
7.5.3. application
7.5.4. Emphasis with boldface
7.5.5. callout graphics
7.5.6. firstterm
7.5.7. guibutton, guiicon, guilabel, and guimenu
7.5.8. The keysym element
7.5.9. HTML inline math
7.6. HTML block element customizations
7.6.1. The programlisting element
7.6.2. The html-lit-block template: Formatting a literate block
7.7. Epilogue for the HTML stylesheet
8. html-titlepage.xml: HTML title page template
9. docbook.css: The CSS stylesheet for the HTML rendering
9.1. docbook.css: Prologue
9.2. docbook.css: General page layout
9.3. docbook.css: Inline elements
9.3.1. span.colophon-uri
9.3.2. span.application
9.3.3. The span.gui{button|icon|label|menu} group
9.3.4. span.term
9.4. docbook.css: Block elements
9.4.1. pre.executable
9.4.2. pre.programlisting and pre.screen
9.4.3. div.abstract
9.4.4. div.codeblocklabel
9.4.5. div.colophon
9.4.6. div.colophon-author
9.4.7. div.colophon-date
9.4.8. div.colophon-mail-to
9.4.9. div.colophon-url
10. tcc_fo.xsl: PDF customization layer
10.1. General page layout
10.2. Templates for title elements
10.3. PDF headers and footers
10.3.1. Other header/footer options to consider
10.4. PDF section and subsection headings
10.5. PDF inline element customizations
10.5.1. The inline.italicsansseq template
10.5.2. The inline.smallcaps template
10.5.3. application and the gui* group
10.5.4. Bold emphasis
10.5.5. Callouts
10.5.6. firstterm
10.5.7. keysym
10.5.8. Inline math
10.5.9. ulink
10.5.10. xref: Page cross-reference format
10.6. PDF block element customizations
10.6.1. Admonitions: caution, important, note, tip, and warning
10.6.2. programlisting and other verbatim elements
10.6.3. The fo-lit-block template: Format a literate block
10.6.4. variablelist: Variable list entry term
10.7. PDF epilogue
11. fo-titlepage.xml: PDF title page template
12. Configuration of XEP
12.1. xep.xml: Stock prologue
12.2. xep.xml: TCC modifications
12.3. xep.xml: Stock epilogue

1. Introduction

DocBook is a generalized framework for writing documentation using XML. Here at the New Mexico Tech Computer Center (TCC), we use DocBook extensively for external and internal documentation. Among the many advantages of this system is that a single source document can be translated mechanically to both HTML and PDF representations.

This document contains all the files used for local customization, in “lightweight literate programming” format. For more information, see the author's Lightweight literate programming page.

The local DocBook toolchain consists of these components:

  • Norman Walsh's DocBook-XSL Stylesheets provide a generic styling of DocBook that can be customized with local style conventions. These stylesheets consist of XSLT scripts. For more information about XSLT, see XSL Transformations (XSLT) Version 1.0.

    These style sheets can be downloaded from the SourceForge repository.

  • The xsltproc package implements the XSLT language. Production of the HTML output from a DocBook document needs only XSLT.

  • The xep processor is necessary to produce the printable, PDF (Adobe Page Description Format) form of a DocBook document. This transformation starts by using xsltproc to transform the original DocBook document into XSL, also known as XSL-FO (for Formatting Objects). The resulting .fo file is input to xep, which produces the PDF output file.

    For more information on XSL, see the standard: Extensible Stylesheet Language (XSL) Version 1.0.

1.1. Bob Stayton's DocBook XSL: The complete guide

Without customization, the stock DocBook-XSL Stylesheets produce a pretty bland, generic output style. This document describes the TCC's local customization layers, built on top of the DocBook-XSL Stylesheets, that give our documents their local style.

Documentation for the DocBook-XSL Stylesheets is rather skeletal. Fortunately, there is an excellent book that describes the customization process in detail:

Stayton, Bob. DocBook XSL: The complete guide. Third edition, March 2005, ISBN 0-9741521-2-9.

This book will be referred to throughout this document as “Stayton.”