etc/services - sync with NetBSD-8
[minix.git] / external / bsd / bind / dist / doc / xsl / isc-docbook-latex.xsl.in
blob3ed3567720b89138e59a6bac2b5ce045800357f8
1 <!--
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.
15 -->
17 <!-- Id -->
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>
55 </xsl:if>
56 </xsl:template>
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"/>
67 <xsl:apply-imports/>
68 </xsl:template>
70 <!--
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.
74 -->
75 <xsl:template match="tbody/row/entry/para[position() != last()]">
76 <xsl:apply-imports/>
77 <xsl:text> \par </xsl:text>
78 </xsl:template>
80 <!--
81 - Add support for <optional/> in <programlisting/>.
82 -->
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>
87 </xsl:template>
89 <!--
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.
96 -->
97 <xsl:param name="latex.maketitle">
98 <xsl:text>
99 \begin{titlepage}
100 \null\vfil
101 \vskip 60pt
102 \begin{center}%
103 { %\LARGE
104 \Huge
105 \bfseries
106 </xsl:text>
107 <xsl:for-each select="/book/title">
108 <xsl:call-template name="text"/>
109 </xsl:for-each>
110 <xsl:text>
111 \par}%
112 \vskip 3em%
113 { %\large
114 \Large
115 \lineskip .75em%
116 </xsl:text>
117 <xsl:for-each select="/book/bookinfo/releaseinfo[1]">
118 <xsl:call-template name="text"/>
119 </xsl:for-each>
120 <xsl:text>
121 \par}
122 %\vskip 1.5em%
123 \vfil
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}
131 \end{center}\par
132 \vfil\null
133 \end{titlepage}
134 </xsl:text>
135 <xsl:text>&#10;</xsl:text>
136 </xsl:param>
138 <!-- Add version in footer. -->
139 <xsl:param name="latex.book.preamble.post">
140 <xsl:text>
141 \pagestyle{fancy}
142 \fancyfoot[ce,co]{\thepage}
143 \fancyfoot[le,ro]{@BIND9_VERSIONSTRING@}
144 \renewcommand{\headrulewidth}{0.4 pt}
145 \fancypagestyle{plain}{%
146 \fancyhf{}%
147 \fancyfoot[ce,co]{\thepage}%
148 \fancyfoot[le,ro]{@BIND9_VERSIONSTRING@}%
149 \renewcommand{\headrulewidth}{0 pt}
151 </xsl:text>
152 </xsl:param>
154 <!--
155 - More front matter: copyright notice, CVS revision number, table
156 - of contents.
158 <xsl:template match="book/bookinfo">
159 <xsl:text>\thispagestyle{empty}&#10;</xsl:text>
160 <xsl:apply-imports/>
161 <xsl:text>\begin{center}&#10;</xsl:text>
162 <xsl:value-of select="$isc.copyright.text"/>
163 <xsl:text>\end{center}&#10;</xsl:text>
164 <xsl:for-each select="/book/bookinfo/releaseinfo[position() &gt; 1]">
165 <xsl:text>\begin{center}</xsl:text>
166 <xsl:call-template name="text"/>
167 <xsl:text>\end{center}&#10;</xsl:text>
168 </xsl:for-each>
169 <xsl:text>
170 \vfill
171 \begin{center}
172 Internet System Consortium \\
173 950 Charter Street \\
174 Redwood City, California \\
175 USA \\
176 http://www.isc.org/
177 \end{center}
178 </xsl:text>
179 <xsl:text>
180 \newpage
181 \pagenumbering{roman}
182 \tableofcontents
183 \newpage
184 \pagenumbering{arabic}
185 </xsl:text>
186 </xsl:template>
188 <!--
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>
195 <xsl:apply-imports/>
196 <xsl:text>}</xsl:text>
197 </xsl:template>
199 </xsl:stylesheet>
201 <!--
202 - Local variables:
203 - mode: sgml
204 - End: