2 - Copyright (C) 2005, 2007 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 <!-- $Id: isc-docbook-latex.xsl.in,v 1.6 2007/06/19 23:47:13 tbox Exp $ -->
19 <!-- ISC customizations for db2latex generator -->
21 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
23 <!-- Import the db2latex stuff -->
24 <xsl:import href="db2latex/xsl/docbook.xsl"/>
26 <!-- Blank lines between paragraphs, please -->
27 <xsl:param name="latex.use.parskip" select="1"/>
29 <!-- Least bad current option for constructing tables -->
30 <xsl:param name="latex.use.ltxtable" select="1"/>
31 <xsl:param name="latex.use.longtable" select="1"/>
33 <!-- LaTeX2e documentclass options. -->
34 <xsl:param name="latex.documentclass.common"/>
35 <xsl:param name="latex.documentclass.book">10pt,twoside,openright</xsl:param>
37 <!-- This documentation is in English (or maybe Bad English) -->
38 <xsl:param name="latex.babel.language" select="'english'"/>
39 <xsl:param name="l10n.gentext.default.language" select="'en'"/>
41 <!-- Where to find "admonition" graphics -->
42 <xsl:param name="admon.graphics.path" select="'db2latex/xsl/figures'"/>
44 <!-- ANSI C function prototypes, please -->
45 <xsl:param name="funcsynopsis.style">ansi</xsl:param>
47 <!-- Local modifications to db2latex's mapping rules -->
48 <xsl:param name="latex.mapping.xml" select="document('isc-docbook-latex-mappings.xml')"/>
50 <!-- Patch around db2latex (0.8pre1) bug -->
51 <xsl:template match="copyright/year">
52 <xsl:apply-templates />
53 <xsl:if test="position() != last()">
54 <xsl:text>, </xsl:text>
58 <!-- Include our copyright generator -->
59 <xsl:include href="copyright.xsl"/>
61 <!-- Set comment convention for this output format -->
62 <xsl:param name="isc.copyright.leader">% </xsl:param>
64 <!-- Intercept top level to prepend copyright -->
65 <xsl:template match="/">
66 <xsl:value-of select="$isc.copyright"/>
71 - Add support for multiple <para/> elements in a table entry.
72 - db2latex is already typesetting the table entry as a parbox,
73 - so we just have to insert the paragraph breaks.
75 <xsl:template match="tbody/row/entry/para[position() != last()]">
77 <xsl:text> \par </xsl:text>
81 - Add support for <optional/> in <programlisting/>.
83 <xsl:template match="optional" mode="latex.verbatim">
84 <xsl:text>[</xsl:text>
85 <xsl:apply-templates mode="latex.verbatim"/>
86 <xsl:text>]</xsl:text>
90 - Customize the title page. Are we having fun yet?
92 - NB: filename of graphic specified without extension.
93 - LaTeX includes file.eps, PDFLaTeX includes file.pdf.
95 - Spacing and font sizes could probably use some work.
97 <xsl:param name="latex.maketitle">
107 <xsl:for-each select="/book/title">
108 <xsl:call-template name="text"/>
117 <xsl:for-each select="/book/bookinfo/releaseinfo[1]">
118 <xsl:call-template name="text"/>
124 \includegraphics{isc-logo}
129 <xsl:text> </xsl:text>
133 - More front matter: copyright notice, CVS revision number, table
136 <xsl:template match="book/bookinfo">
138 <xsl:text>\begin{center} </xsl:text>
139 <xsl:value-of select="$isc.copyright.text"/>
140 <xsl:text>\end{center} </xsl:text>
141 <xsl:for-each select="/book/bookinfo/releaseinfo[position() > 1]">
142 <xsl:text>\begin{center}</xsl:text>
143 <xsl:call-template name="text"/>
144 <xsl:text>\end{center} </xsl:text>
146 <xsl:text>\tableofcontents </xsl:text>
150 - Try to avoid some weird looking line breaks.
152 - This doesn't really work right, so disable for now.
154 <xsl:template match="literal" mode="disabled">
155 <xsl:text>\mbox{</xsl:text>
157 <xsl:text>}</xsl:text>