xref: /minix3/external/bsd/bind/dist/doc/xsl/isc-notes-latex.xsl.in (revision 00b67f09dd46474d133c95011a48590a8e8f94c7)
1<!--
2 - Copyright (C) 2014, 2015  Internet Systems Consortium, Inc. ("ISC")
3 -
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.
7 -
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-->
16
17<!-- ISC customizations for db2latex generator -->
18
19<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
20
21  <!-- Import the db2latex stuff -->
22  <xsl:import href="@XSLT_DB2LATEX_STYLE@"/>
23
24  <!-- Blank lines between paragraphs, please -->
25  <xsl:param name="latex.use.parskip" select="1"/>
26
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"/>
30
31  <!-- LaTeX2e documentclass options. -->
32  <xsl:param name="latex.documentclass.common"/>
33  <xsl:param name="latex.documentclass.book">10pt,twoside,openright</xsl:param>
34
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'"/>
38
39  <!-- Where to find "admonition" graphics -->
40  <xsl:param name="admon.graphics.path" select="'@XSLT_DB2LATEX_ADMONITIONS@'"/>
41
42  <!-- ANSI C function prototypes, please -->
43  <xsl:param name="funcsynopsis.style">ansi</xsl:param>
44
45  <!-- Local modifications to db2latex's mapping rules -->
46  <xsl:param name="latex.mapping.xml" select="document('isc-docbook-latex-mappings.xml')"/>
47
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>
53    </xsl:if>
54  </xsl:template>
55
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"/>
60
61  <!-- Suppress title page, header -->
62  <xsl:param name="latex.maketitle"/>
63  <xsl:param name="latex.use.fancyhdr"/>
64
65  <!-- Single column -->
66  <xsl:param name="latex.documentclass.article">a4paper,10pt,twoside,openright</xsl:param>
67
68  <!--
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.
72   -->
73  <xsl:template match="tbody/row/entry/para[position() != last()]">
74    <xsl:apply-imports/>
75    <xsl:text> \par </xsl:text>
76  </xsl:template>
77
78  <!--
79    - Add support for <optional/> in <programlisting/>.
80   -->
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>
85  </xsl:template>
86
87  <!--
88    - Try to avoid some weird looking line breaks.
89    -
90    - This doesn't really work right, so disable for now.
91   -->
92  <xsl:template match="literal" mode="disabled">
93    <xsl:text>\mbox{</xsl:text>
94    <xsl:apply-imports/>
95    <xsl:text>}</xsl:text>
96  </xsl:template>
97
98</xsl:stylesheet>
99
100<!--
101  - Local variables:
102  - mode: sgml
103  - End:
104 -->
105