Suggestions |
---|
Search: |
You can modify the ‘beginnings’ and ‘ends’ of some templates through the DB2LaTeX ‘mapping’ system. This is commonly used to commence and environment or section-type component. The steps to do this are the following:
Create an XML file that contains your mappings. This is called your ‘mapping file’.
Override an XSL parameter in your driver file so that your mapping file can be found.
Process your DocBook source document with your favourite XSL processor.
The availability of mappings is indicated in Chapter 1 of the Reference and may be found in latex.mapping.xml.
Create a text file, e.g. mydb2latex.map, like this:
<?xml version='1.0'?> <!DOCTYPE latexbindings SYSTEM "http://db2latex.sourceforge.net/xsl/latex.mapping.dtd"> <latexbindings> <latexmapping role="begin"> <mapping key="glossary" text=""> <line>\section{%title} </line> </mapping> </latexmapping> <latexmapping role="end"> <mapping key="glossary" text="\hrulefill "/> </latexmapping> </latexbindings>
DB2LaTeX lets you specify your mappings via the latex.mapping.xml parameter:
<?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:import href="http://db2latex.souceforge.net/xsl/docbook.xsl"/> <xsl:param name="latex.mapping.xml" select="document('mydb2latex.map')"/> </xsl:stylesheet>