2 - Copyright (C) 2005, 2007, 2010, 2014 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.
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=
"@XSLT_DB2LATEX_STYLE@"/>
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=
"'@XSLT_DB2LATEX_ADMONITIONS@'"/>
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 % Not sure exactly how much to trim logo, but given that
125 % this is a centered environment, we need not be too precise
126 % so long as the image is centered in the input PDF, we
127 % trim enough for it to fit on page, and we do not trim
128 % so much that we clip out part of the graphic itself.
129 % This seems to work, anyway.
130 \includegraphics[trim=
400 400 400 400,scale=
2.5]{isc-logo}
135 <xsl:text> </xsl:text>
138 <!-- Add version in footer. -->
139 <xsl:param name=
"latex.book.preamble.post">
142 \fancyfoot[ce,co]{\thepage}
143 \fancyfoot[le,ro]{@BIND9_VERSIONSTRING@}
144 \renewcommand{\headrulewidth}{
0.4 pt}
145 \fancypagestyle{plain}{%
147 \fancyfoot[ce,co]{\thepage}%
148 \fancyfoot[le,ro]{@BIND9_VERSIONSTRING@}%
149 \renewcommand{\headrulewidth}{
0 pt}
155 - More front matter: copyright notice, CVS revision number, table
158 <xsl:template match=
"book/bookinfo">
159 <xsl:text>\thispagestyle{empty}
</xsl:text>
161 <xsl:text>\begin{center}
</xsl:text>
162 <xsl:value-of select=
"$isc.copyright.text"/>
163 <xsl:text>\end{center}
</xsl:text>
164 <xsl:for-each select=
"/book/bookinfo/releaseinfo[position() > 1]">
165 <xsl:text>\begin{center}
</xsl:text>
166 <xsl:call-template name=
"text"/>
167 <xsl:text>\end{center}
</xsl:text>
172 Internet System Consortium \\
173 950 Charter Street \\
174 Redwood City, California \\
181 \pagenumbering{roman}
184 \pagenumbering{arabic}
189 - Try to avoid some weird looking line breaks.
191 - This doesn't really work right, so disable for now.
193 <xsl:template match=
"literal" mode=
"disabled">
194 <xsl:text>\mbox{
</xsl:text>
196 <xsl:text>}
</xsl:text>