2 - Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
4 - Permission to use, copy, modify, and/or distribute this software for any
5 - purpose with or without fee is hereby granted, provided that the above
6 - copyright notice and this permission notice appear in all copies.
8 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 - PERFORMANCE OF THIS SOFTWARE.
17 <!-- ISC customizations for db2latex generator -->
19 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
21 <!-- Import the db2latex stuff -->
22 <xsl:import href=
"@XSLT_DB2LATEX_STYLE@"/>
24 <!-- Blank lines between paragraphs, please -->
25 <xsl:param name=
"latex.use.parskip" select=
"1"/>
27 <!-- Least bad current option for constructing tables -->
28 <xsl:param name=
"latex.use.ltxtable" select=
"1"/>
29 <xsl:param name=
"latex.use.longtable" select=
"1"/>
31 <!-- LaTeX2e documentclass options. -->
32 <xsl:param name=
"latex.documentclass.common"/>
33 <xsl:param name=
"latex.documentclass.book">10pt,twoside,openright
</xsl:param>
35 <!-- This documentation is in English (or maybe Bad English) -->
36 <xsl:param name=
"latex.babel.language" select=
"'english'"/>
37 <xsl:param name=
"l10n.gentext.default.language" select=
"'en'"/>
39 <!-- Where to find "admonition" graphics -->
40 <xsl:param name=
"admon.graphics.path" select=
"'@XSLT_DB2LATEX_ADMONITIONS@'"/>
42 <!-- ANSI C function prototypes, please -->
43 <xsl:param name=
"funcsynopsis.style">ansi
</xsl:param>
45 <!-- Local modifications to db2latex's mapping rules -->
46 <xsl:param name=
"latex.mapping.xml" select=
"document('isc-docbook-latex-mappings.xml')"/>
48 <!-- Patch around db2latex (0.8pre1) bug -->
49 <xsl:template match=
"copyright/year">
50 <xsl:apply-templates />
51 <xsl:if test=
"position() != last()">
52 <xsl:text>,
</xsl:text>
56 <!-- Number by section, not chapter -->
57 <xsl:param name=
"chapter.autolabel" select=
"1"/>
58 <xsl:param name=
"section.autolabel" select=
"1"/>
59 <xsl:param name=
"section.label.includes.component.label" select=
"0"/>
61 <!-- Suppress title page, header -->
62 <xsl:param name=
"latex.maketitle"/>
63 <xsl:param name=
"latex.use.fancyhdr"/>
65 <!-- Single column -->
66 <xsl:param name=
"latex.documentclass.article">a4paper,
10pt,twoside,openright
</xsl:param>
69 - Add support for multiple <para/> elements in a table entry.
70 - db2latex is already typesetting the table entry as a parbox,
71 - so we just have to insert the paragraph breaks.
73 <xsl:template match=
"tbody/row/entry/para[position() != last()]">
75 <xsl:text> \par
</xsl:text>
79 - Add support for <optional/> in <programlisting/>.
81 <xsl:template match=
"optional" mode=
"latex.verbatim">
82 <xsl:text>[
</xsl:text>
83 <xsl:apply-templates mode=
"latex.verbatim"/>
84 <xsl:text>]
</xsl:text>
88 - Try to avoid some weird looking line breaks.
90 - This doesn't really work right, so disable for now.
92 <xsl:template match=
"literal" mode=
"disabled">
93 <xsl:text>\mbox{
</xsl:text>
95 <xsl:text>}
</xsl:text>