Custom Mappings


You can modify the ‘beginnings’ and ‘ends’ of some templates through the DB2LaTeXmapping’ system. This is commonly used to commence and environment or section-type component. The steps to do this are the following:

  1. Create an XML file that contains your mappings. This is called your ‘mapping file’.

  2. Override an XSL parameter in your driver file so that your mapping file can be found.

  3. Process your DocBook source document with your favourite XSL processor.

The availability of mappings is indicated in Chapter1 of the Reference and may be found in latex.mapping.xml.

Create an XML file that contains your mappings

Create a text file, e.g., like this:

<?xml version='1.0'?>
<!DOCTYPE latexbindings SYSTEM "">
  <latexmapping role="begin">
    <mapping key="glossary" text="">
  <latexmapping role="end">
    <mapping key="glossary" text="\hrulefill &#10;"/>

Configure your driver file

DB2LaTeX lets you specify your mappings via the latex.mapping.xml parameter:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="" version='1.0'>
  <xsl:import href=""/>
  <xsl:param name="latex.mapping.xml" select="document('')"/>

Further LaTeX Customization

A large number of customizations are possible if you have some knowledge of LaTeX. For example, you could change the way chapter headings are formatted. You may wish to refer to our LaTeX guide: