2
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3
<!--############################################################################
4
| $Id: param-switch.mod.xsl,v 1.17 2004/01/31 11:52:31 j-devenish Exp $
5
+ ############################################################################## -->
8
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
10
exclude-result-prefixes="doc" version='1.0'>
12
<doc:reference id="param-switch" xmlns="">
14
<releaseinfo role="meta">
15
$Id: param-switch.mod.xsl,v 1.17 2004/01/31 11:52:31 j-devenish Exp $
22
<year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
23
<holder>Ramon Casellas</holder>
26
<doc:revision rcasver="1.1">&rev_2003_05;</doc:revision>
29
<title>Parameters: &DB2LaTeX; Switches <filename>param-switch.mod.xsl</filename></title>
33
The values of parameters in this file are used to influence
34
the behaviour of &DB2LaTeX; templates through the selection
35
of pre-defined options.
36
All parameter names begin with <quote>latex.</quote>.
42
In some stylesheets, tests of parameter values use
43
<quote>!=0</quote> logic. However, &DB2LaTeX; uses
44
<quote>=1</quote> logic. This means that empty parameters are
45
<quote>off</quote> in &DB2LaTeX; but <quote>on</quote> in those
46
other stylesheets. The <ulink
47
url="http://www.w3.org">XPath</ulink> values
48
<quote>true()</quote> and <quote>false()</quote> work as
57
<refpurpose> Control the display of <doc:db basename="caption">captions</doc:db> in lists of figures. </refpurpose>
60
By default, lists of figures (see <xref linkend="template.lot"/>)
61
will include both figure <doc:db basename="title">titles</doc:db> and mediaobject <doc:db basename="caption">captions</doc:db>.
62
This is useful for readers, as they have a full description of each figure.
63
However, it is impractical for large documents because the list
64
of figures will occupy too many pages.
67
This variable, when set to '1', authorises DB2LaTeX to include
68
mediaobject captions in lists of figures. It is enabled by default.
69
When set to '0', lists of figures will contain only the
74
<xsl:param name="latex.caption.lot.titles.only">1</xsl:param>
78
Control the output of the \bibliography{.bib}.
81
<para>The value of this parameter is output.</para>
82
<para>An example is <quote><filename>citations.bib</filename></quote>,
83
if your BibTeX file has that name.</para>
86
<xsl:param name="latex.bibfiles"></xsl:param>
89
<refpurpose> Controls the output of LaTeX packages and commands to support
90
documents with math commands and environments..</refpurpose>
92
<para>If this parameter is set to 1, the stylesheets generate code to
93
<emphasis>DEFAULT: 1</emphasis> Only more code is generated.
97
<xsl:param name="latex.math.support">1</xsl:param>
100
<refpurpose> Controls if the revision history table is generated as the first document
104
<para>If this parameter is set to 1, the stylesheets generate code to
105
<emphasis>DEFAULT: 1</emphasis> Only more code is generated.
109
<xsl:param name="latex.output.revhistory">1</xsl:param>
111
<doc:template name="latex.fancybox.options" xmlns="">
112
<refpurpose> Options for fancybox </refpurpose>
115
<xsl:if test="@role">
117
<xsl:when test="@role='small'">
118
<xsl:text>,fontsize=\small</xsl:text>
120
<xsl:when test="@role='large'">
121
<xsl:text>,fontsize=\large</xsl:text>
127
<doc:todo>Undocumented.</doc:todo>
131
<xsl:template name="latex.fancybox.options">
135
<refpurpose> Controls the output of LaTeX commands to support the generation
136
of PDF files.</refpurpose>
138
<para>If this parameter is set to 1, the stylesheets generate code to
139
detect if it is either <literal>latex</literal> or <literal>pdflatex</literal>
140
the shell command that is being used to compile the LaTeX text file. Some
141
packages (<literal>graphicx</literal>, <literal>hyperref</literal>) are used
142
with the right parameters. Finally, the graphic extensions declared, to use in
143
<literal>\includegraphics</literal> commands depends also on which command is
144
being used. If this parameter is set to zero, such code is not generated (which
145
does not mean that the file cannot compile with pdflatex, but some strange issues
146
may appear). <emphasis>DEFAULT: 1</emphasis> Only more code is generated.
150
<xsl:param name="latex.pdf.support">1</xsl:param>
153
<refpurpose> Enable the generation of indexterms </refpurpose>
154
<doc:description><para>Support index generation.</para></doc:description>
156
<xsl:param name="latex.generate.indexterm">1</xsl:param>
159
<refpurpose> DB2LaTeX hyphenation linebreak tricks </refpurpose>
162
Usually, LaTeX does not perform hyphenation in <quote>teletype</quote> (monospace)
163
text. This can lead to formatting problems. But certain monospace texts, such as
164
URLs and filenames, have <quote>natural</quote> breakpoints such as full stops
165
and slashes. DB2LaTeX's <quote>tttricks</quote> exploit a hyphenation trick in
166
order to provide line wrapping in the middle of monospace text. Set this to '1'
167
to enable these tricks (they are not enabled by default). See also the FAQ.
171
<xsl:param name="latex.hyphenation.tttricks">0</xsl:param>
174
<refpurpose> Decimal point for &LaTeX; tables </refpurpose>
178
This is a non-localisable character that may be used
179
for decimal alignment of &LaTeX; tables.
184
<xsl:param name="latex.decimal.point"/>
187
<refpurpose>Toggle the trimming of leading and trailing whitespace in verbatim environments </refpurpose>
188
<doc:description><para>
189
In verbatim environments such as <doc:db>programlisting</doc:db> and <doc:db>screen</doc:db>,
190
it can be useful to trim leading and trailing whitespace. However, this is not compliant
191
with The Definitive Guide.
192
</para></doc:description>
194
<xsl:param name="latex.trim.verbatim">0</xsl:param>
197
<refpurpose>Toggle the use of the <productname>ltxtable</productname> LaTeX package</refpurpose>
200
This is not implemented as true ltxtable support, yet.
201
It uses longtable until we can integrate proper ltxtable support.
202
One the feature is supported, it should probably be enabled by
205
<para>If this package is used then tables will be have the capability
206
to run over multiple pages when necessary.</para>
208
Cells spanning multiple columns may require extra passes with LaTeX
209
in order for column widths to 'converge'.
213
<xsl:param name="latex.use.ltxtable">0</xsl:param>
216
<refpurpose>Toggle the use of the <productname>longtable</productname> LaTeX package</refpurpose>
219
Enabling this option allows <doc:db
220
basename="simplelist">simplelists</doc:db> to run over multiple
221
pages. In the future, it will be superseded by <xref
222
linkend="param.latex.use.ltxtable"/>.
226
<xsl:param name="latex.use.longtable">0</xsl:param>
229
<refpurpose>Toggle the use of the <productname>overpic</productname> LaTeX package</refpurpose>
230
<doc:description><para>Facilitates overlays (for callouts).</para></doc:description>
232
<xsl:param name="latex.use.overpic">1</xsl:param>
235
<refpurpose>Toggle the use of the <productname>umoline</productname> LaTeX package</refpurpose>
236
<doc:description><para>Provide underlining.</para></doc:description>
238
<xsl:param name="latex.use.umoline">0</xsl:param>
241
<refpurpose>Toggle the use of the <productname>url</productname> LaTeX package</refpurpose>
242
<doc:description><para>Provide partial support for hyperlinks.</para></doc:description>
244
<xsl:param name="latex.use.url">1</xsl:param>
247
<refpurpose>Toggle the use of the the <quote>draft</quote> preamble</refpurpose>
248
<doc:description><para>&DB2LaTeX; provides a number of draft-mode features to aid
249
the refinement of documents. Normally, this mode is enabled or disabled according
250
to the <sgmltag class='attribute'>status</sgmltag> attribute of the top-level
251
<doc:db>book</doc:db> or <doc:db>article</doc:db> element. However, this variable
252
will take precedence when it is not empty. It is empty by default.</para>
255
<simplelist type='inline'>
261
<xsl:param name="latex.is.draft"/>
264
<refpurpose>Toggle the use of the <productname>varioref</productname> LaTeX package</refpurpose>
265
<doc:description><para><productname>varioref</productname> seemed like a good idea at first,
266
but we not realise it does understand &DocBook; gentext localisations. By default, it is enabled
267
when <xref linkend="param.insert.xref.page.number"/> is enabled.</para></doc:description>
269
<xsl:param name="latex.use.varioref">
270
<xsl:if test="$insert.xref.page.number='1'">1</xsl:if>
274
<refpurpose>Toggle the use of the <productname>fancyhdr</productname> LaTeX package</refpurpose>
275
<doc:description><para>Provides page headers and footers. Disabling support for
276
this package will make headers and footer go away.</para></doc:description>
278
<xsl:param name="latex.use.fancyhdr">1</xsl:param>
281
<refpurpose> Control the inclusion of chapter titles in <doc:db basename="lot">lots</doc:db> </refpurpose>
284
When this variable is set, lists of tables and lists of figures
285
will be grouped and labeled by chapter.
289
<xsl:param name="latex.bridgehead.in.lot">1</xsl:param>
292
<refpurpose> Configure the application of truncation partitions </refpurpose>
296
For <xref linkend="param.latex.fancyhdr.truncation.partition"/>, the
297
partition can be modulated in a left-right fashion or an
298
inside-outside fashion. Use <quote>lr</quote> for left-right,
299
all other values are inside-outside (<quote>io</quote> is
300
suggested). The default is <quote>io</quote>, because this
301
matches <xref linkend="param.latex.documentclass.book"/>.
306
<xsl:param name="latex.fancyhdr.truncation.style">io</xsl:param>
309
<refpurpose> Configure the width of header portions on each page </refpurpose>
313
It is possible that the titles of chapter or sections will
314
occupy more than the width of a single line. When this variable
315
is empty, headers will be allowed to occupy multiple lines.
316
However, it is possible that the left-hand portion of a header
317
will collide with the right-hand portion of header. To prevent
318
this, headers can be truncated if they exceed an allowable
319
width. When this variables is set to a number from zero to 100,
320
the left-hand (or inside) side of each header will have that
321
width reserved. The right-hand (or outside) side will have the
322
remainder. A common option is to set this variable to zero and
323
set <xref linkend="param.latex.fancyhdr.truncation.style"/> to
329
<xsl:param name="latex.fancyhdr.truncation.partition">50</xsl:param>
332
<refpurpose> Section/chapter style for fancy headers </refpurpose>
336
&DB2LaTeX; comes with some pre-configured styles for page
337
headers. These include <quote></quote>, the default, which is
338
determined by the <productname>fancyhdr</productname> package.
339
Another option is <quote>natural</quote>, in which both the
340
chapter and section are shown on each page with their numbers.
341
An alternative is to provide your own <xref
342
linkend="template.generate.latex.pagestyle"/> template with a
343
value such as <literal>\pagestyle{headings}</literal> (the
344
<quote>headings</quote> page style, which is not a
345
<productname>fancyhdr</productname> style, shows page numbers
346
in the headers whereas the others show page numbers in the
352
<xsl:param name="latex.fancyhdr.style"/>
355
<refpurpose>Toggle the use of the <productname>parskip</productname> &latex; package</refpurpose>
357
<para>Use <quote>block</quote> paragraph style instead of indentation.</para>
360
<para><productname>parskip</productname> introduces vertical whitespace between
361
paragraphs and list items. However, &db2latex;'s <doc:db>toc</doc:db> and
362
<doc:db>lot</doc:db> templates attempt to suppress this whitespace.</para>
363
<para>When this option is off, you may wish to investigate <xref linkend="param.latex.use.noindent"/>.</para>
367
<listitem><simpara><xref linkend="template.para"/></simpara></listitem>
371
<xsl:param name="latex.use.parskip">0</xsl:param>
374
<refpurpose>Toggle the use of <function condition="latex">noindent</function> commands</refpurpose>
378
When this parameter is 1, &DB2LaTeX; will deliberately insert
379
noindents at particular locations within your document.
386
When traditional &LaTeX; paragraph indentation and spacing is used,
387
it is often necessary to use <function
388
condition="latex">noindent</function> after certain block-formatted
389
elements (e.g. <doc:db>itemizedlist</doc:db>). Let us know if we
390
need to insert more <function
391
condition="latex">noindent</function>---so far, there are few
392
places where we make use of it.
397
By default, this option will be turned on when <xref
398
linkend="param.latex.use.parskip"/> is <emphasis>off</emphasis> and
399
will be turned off when <xref linkend="param.latex.use.parskip"/>
400
is <emphasis>on</emphasis>.
406
<listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
410
<xsl:param name="latex.use.noindent">
412
<xsl:when test="$latex.use.parskip=1">
413
<xsl:value-of select="0"/>
416
<xsl:value-of select="1"/>
422
<refpurpose>Toggle the use of the <productname>subfigure</productname> LaTeX package</refpurpose>
423
<doc:description><para>Used to provide nice layout of multiple mediaobjects in figures.</para></doc:description>
425
<xsl:param name="latex.use.subfigure">1</xsl:param>
428
<refpurpose>Toggle the use of the <productname>rotating</productname> LaTeX package</refpurpose>
429
<doc:description><para>Undocumented.</para></doc:description>
431
<xsl:param name="latex.use.rotating">1</xsl:param>
434
<refpurpose>Toggle the use of the <productname>tabularx</productname> LaTeX package</refpurpose>
435
<doc:description><para>Used to provide certain table features. Has some incompatabilities
436
with packages, but also solves some conflicts that the regular tabular
437
environment has.</para></doc:description>
439
<xsl:param name="latex.use.tabularx">1</xsl:param>
442
<refpurpose>Toggle the use of the <productname>dcolumn</productname> LaTeX package</refpurpose>
445
Currently, <productname>dcolumn</productname> support does not function
449
<productname>dcolumn</productname> provides support for the <literal>char</literal>
450
alignment of table cells.
455
<listitem><simpara><xref linkend="param.latex.decimal.point"/></simpara></listitem>
459
<xsl:param name="latex.use.dcolumn">0</xsl:param>
462
<refpurpose>Toggle the use of the <productname>hyperref</productname> LaTeX package</refpurpose>
463
<doc:description><para>This is used extensively for hyperlinking within documents.</para></doc:description>
465
<xsl:param name="latex.use.hyperref">1</xsl:param>
468
<refpurpose>Toggle the use of the <productname>fancybox</productname> LaTeX package</refpurpose>
469
<doc:description><para>This is essential for admonitions.</para></doc:description>
471
<xsl:param name="latex.use.fancybox">1</xsl:param>
474
<refpurpose>Toggle the use of the <productname>fancyvrb</productname> LaTeX package</refpurpose>
475
<doc:description><para>Provides support for tabbed whitespace in verbatim environments.
476
See also <xref linkend="param.latex.fancyvrb.tabsize"/>.</para></doc:description>
478
<xsl:param name="latex.use.fancyvrb">1</xsl:param>
481
<refpurpose>Toggle the use of the <productname>isolatin1</productname> LaTeX package</refpurpose>
484
This option is deprecated. See <xref linkend="param.latex.inputenc"/>.
488
<xsl:param name="latex.use.isolatin1">0</xsl:param>
491
<refpurpose> Choose whether to use the <productname>unicode</productname> LaTeX package</refpurpose>
492
<doc:description><para>See the <productname>unicode</productname> documentation for details.</para></doc:description>
494
<xsl:param name="latex.use.ucs">0</xsl:param>
497
<refpurpose> Control which references are cited in the bibliography </refpurpose>
500
The DB2LaTeX generated bibliography (bibitems) may either
501
include all biblioentries found in the document, or only thee ones explicitly
502
cited with <sgmltag class="element">citation</sgmltag>.
504
<para>Two values are possible: <quote>all</quote> or <quote>cited</quote>.</para>
507
<xsl:param name="latex.biblio.output">all</xsl:param>
510
<refpurpose> Control bibliographic citation style </refpurpose>
512
<para>By default, this value is empty. Alternatively, a special value
513
is recognised: <quote>ieee</quote> (or <quote>IEEE</quote>).</para>
516
<xsl:param name="latex.biblioentry.style"/>
519
<refpurpose> Improved typesetting of captions </refpurpose>
522
DB2LaTeX supports <link linkend="param.formal.title.placement">$formal.title.placement</link>
523
as a mechanism for choosing whether captions will appear above or below the objects they describe.
525
($formal.title.placement is described in the <ulink
526
url="http://docbook.sourceforge.net/release/xsl/current/doc/html/formal.title.placement.html">DocBook
527
XSL Stylesheet HTML Parameter Reference</ulink>.)
529
However, LaTeX will often produce an ugly result when captions occur
530
above their corresponding content. This usually arises because of
531
unsuitable \abovecaptionskip and \belowcaptionskip.
534
This variable, when set to '1', authorises DB2LaTeX to swap the caption
535
'skip' lengths when a caption is placed <emphasis>above</emphasis> its
536
corresponding content. This is enabled by default.
540
<xsl:param name="latex.caption.swapskip">1</xsl:param>
543
<refpurpose> Control <sgmltag class="element">imagedata</sgmltag> selection. </refpurpose>
545
<para>This controls how DB2LaTeX behaves when a <sgmltag class="element">mediaobject</sgmltag> contains
546
multiple <sgmltag class="element">imagedata</sgmltag>. When non-empty, DB2LaTeX will exclude
547
imagedata that have a format no listed within this variable.</para>
550
<xsl:param name="latex.graphics.formats"></xsl:param>
553
<refpurpose> Control Unicode character handling. </refpurpose>
556
Normally, XSLT processors will convert SGML character entities into
557
Unicode characters and DB2LaTeX doesn't have much chance to do anything
558
toward converting them to LaTeX equivalents. We do not yet know how we
559
can solve this problem best.
562
Proposed values: 'catcode', 'unicode', 'extension'.
563
Currently only 'catcode' is supported. All other values will
564
cause no special handling except for certain mappings in MathML.
565
In future, perhaps the 'unicode' LaTeX package could be of assistance.
566
'Extension' could be an XSLT extension that handles the characters
567
using a mapping table.
571
<xsl:param name="latex.entities"></xsl:param>
574
<refpurpose> Control the use of <sgmltag class="attribute">otherterm</sgmltag> attributes </refpurpose>
577
When a <doc:db>glosssee</doc:db> or <doc:db>glossseealso</doc:db> element contains
578
both an <quote>otherterm</quote> attribute <emphasis>and</emphasis> content templates,
579
this variable elects which will be the source of the displayed text. By default,
580
this variable is enabled and a cross-reference to the otherwterm will be
581
generated (i.e. content templates will be ignored).
585
<xsl:param name="latex.otherterm.is.preferred">1</xsl:param>
588
<refpurpose> Control the use of <sgmltag class="element">alt</sgmltag> text </refpurpose>
591
By default, DB2LaTeX assumes that <sgmltag class="element">alt</sgmltag>
592
text should be typeset in preference to any
593
<sgmltag class="element">mediaobject</sgmltag>s.
598
<listitem><simpara><xref linkend="param.tex.math.in.alt"/></simpara></listitem>
602
<xsl:param name="latex.alt.is.preferred">1</xsl:param>
605
<refpurpose> Whether to apply templates for component titles. </refpurpose>
608
Controls whether component titles will be generated by
609
applying templates or by conversion to string values.
610
When enabled, templates will be applied. This enables template
611
expression in titles but may have problematic side-effects such
616
This variable does not influence all <sgmltag class="element">title</sgmltag>
617
elements. Some may have their own configuration variables or be non-configurable.
622
<xsl:param name="latex.apply.title.templates">1</xsl:param>
625
<refpurpose> Whether to apply templates for admonition titles. </refpurpose>
628
Controls whether admonition titles will be generated by
629
applying templates or by conversion to string values.
630
When enabled, templates will be applied.
634
<xsl:param name="latex.apply.title.templates.admonitions">1</xsl:param>
637
<refpurpose> Whether to delimit URLs with quotation characters </refpurpose>
640
When this option is enabled, gentext quotation characters
641
(urlstartquote and urlendquote) are used to delimit the
642
URLs when they are displayed as part of <doc:db>ulink</doc:db>
643
formatting. The delimiters do not form part of the URL or
648
<xsl:param name="latex.url.quotation">1</xsl:param>
651
<refpurpose> Control string comparison for <doc:db basename="ulink">ulinks</doc:db> </refpurpose>
655
The formatting of a <doc:db>ulink</doc:db> element varies according
656
to whether its <sgmltag class="attribute">url</sgmltag> attribute
657
differs from its content. When this option is enabled, the
658
comparison between these two values ignores the
659
<quote>protocol</quote> portion of the URL (that which occurs
660
before ':' or '://', as a concession to HTTP URLs). For example,
661
when this option is enabled, <quote>a.b.c/d</quote> would be
662
considered equivalent to <quote>http://a.b.c/d</quote> and
663
<quote>file:a.b.c/d</quote>.
668
<xsl:param name="latex.ulink.protocols.relaxed">
670
<xsl:when test="$ulink.protocols.relaxed!=''">
671
<xsl:message>Warning: $ulink.protocols.relaxed was a misnomer: use $latex.ulink.protocols.relaxed instead</xsl:message>
672
<xsl:value-of select="$ulink.protocols.relaxed"/>
675
<xsl:value-of select="0"/>
679
<xsl:param name="ulink.protocols.relaxed"/>
682
<refpurpose> Control the suppression of headers/footers on blank pages in double-side documents </refpurpose>
686
When this option is enabled, &DB2LaTeX; will attempt to
687
suppress headers and footers on pages that contain no
688
other content (i.e. left-handed pages in a double-sided
689
document). When this option is disabled, &DB2LaTeX; does
690
not interfere with the default appearance of headers and
696
<xsl:param name="latex.suppress.blank.page.headers">1</xsl:param>