2
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3
<!--#############################################################################
4
| $Id: para.mod.xsl,v 1.16 2004/01/13 14:17:45 j-devenish Exp $
5
|- #############################################################################
6
| $Author: j-devenish $
9
+ ############################################################################## -->
11
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
13
exclude-result-prefixes="doc" version='1.0'>
16
<!--############################################################################# -->
17
<!-- DOCUMENTATION -->
18
<doc:reference id="para" xmlns="">
20
<releaseinfo role="meta">
21
$Id: para.mod.xsl,v 1.16 2004/01/13 14:17:45 j-devenish Exp $
28
<year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
29
<holder>Ramon Casellas</holder>
32
<doc:revision rcasver="1.8">&rev_2003_05;</doc:revision>
35
<title>Paragraphs <filename>para.mod.xsl</filename></title>
37
<para>The file <filename>para.mod.xsl</filename> contains the
38
XSL template for <doc:db>para</doc:db>, <doc:db>simpara</doc:db> and <doc:db>formalpara</doc:db>.</para>
41
<listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
42
<listitem><simpara><xref linkend="param.latex.formalpara.title.style"/></simpara></listitem>
48
<doc:template xmlns="">
49
<refpurpose>Use normal paragraph spacing instead of parskip spacing</refpurpose>
52
Uses <function condition="latex">docbooktolatexnoparskip</function>.
57
<listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
64
<xsl:template name="latex.noparskip">
65
<xsl:if test="$latex.use.parskip=1">
66
<xsl:text>\docbooktolatexnoparskip </xsl:text>
70
<doc:template xmlns="">
71
<refpurpose>Use parkip spacing, if user desires it</refpurpose>
74
Uses <function condition="latex">docbooktolatexrestoreparskip</function>.
79
<listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
86
<xsl:template name="latex.restoreparskip">
87
<xsl:if test="$latex.use.parskip=1">
88
<xsl:text>\docbooktolatexrestoreparskip </xsl:text>
92
<doc:template basename="para" match="para|simpara" xmlns="">
93
<refpurpose>Process <doc:db>para</doc:db> and <doc:db>simpara</doc:db> elements</refpurpose>
96
Starts new lines above and below its contents.
97
Thus, consecutive <doc:db basename="para">paras</doc:db> will have
98
one blank line between them.
103
<listitem><simpara><xref linkend="param.latex.use.parskip"/></simpara></listitem>
107
<para>In &latex;, there is no distinction between <doc:db>para</doc:db> and <doc:db>simpara</doc:db>.</para>
108
<para>The accuracy of block elements within <sgmltag basename="para">paras</sgmltag> is unknown.</para>
109
<para><doc:todo>The use of <sgmltag>para</sgmltag> within <doc:db basename="footnote">footnotes</doc:db> is unproven.</doc:todo></para>
112
<simplelist type='inline'>
118
<listitem><simpara><xref linkend="template.para-noline"/></simpara></listitem>
122
<xsl:template match="para|simpara">
123
<xsl:text> </xsl:text>
124
<xsl:apply-templates/>
125
<xsl:text> </xsl:text>
128
<doc:template match="formalpara" xmlns="">
129
<refpurpose>Process <doc:db>formalpara</doc:db> elements</refpurpose>
132
Starts new lines above and below its contents.
137
<listitem><simpara>The <doc:db>title</doc:db> is typeset using <xref linkend="param.latex.formalpara.title.style"/></simpara></listitem>
141
<para>The accuracy of block elements within <doc:db basename="formalpara">formalparas</doc:db> is unknown.</para>
142
<para><doc:todo>The use of <sgmltag>formalpara</sgmltag> within <doc:db basename="footnote">footnotes</doc:db> is unproven.</doc:todo></para>
143
<para>Calls <xref linkend="template.generate.formalpara.title.delimiter"/>.</para>
146
<simplelist type='inline'>
151
<xsl:template match="formalpara">
152
<xsl:text> {</xsl:text>
153
<xsl:value-of select="$latex.formalpara.title.style"/>
154
<xsl:text>{{</xsl:text>
155
<xsl:apply-templates select="title"/>
156
<xsl:text>}</xsl:text>
157
<xsl:call-template name="generate.formalpara.title.delimiter"/>
158
<xsl:text>}}\ </xsl:text>
159
<xsl:apply-templates select="node()[not(self::title)]"/>
160
<xsl:text> </xsl:text>
163
<doc:template xmlns="">
164
<refpurpose>Delimite a <doc:db>formalpara</doc:db>'s <doc:db>title</doc:db> from its <doc:db>para</doc:db></refpurpose>
167
Emits a full stop (period).
176
This template can be used to emit any &LaTeX; sequence that you
177
desire. You can make the appearance be conditional upon some
178
attribute or document location, for instance. However, a
179
'space' will <emphasis>always</emphasis> be generated between
180
this delimiter and the subsequent <doc:db>para</doc:db>
186
<xsl:template name="generate.formalpara.title.delimiter">
187
<xsl:text>.</xsl:text>
190
<doc:template basename="para" xmlns="">
191
<refpurpose>Suppressed paragraphs</refpurpose>
194
These paragraphs are not separated like normal paragraphs.
201
<para>This template exists to handle &latex; problems with
202
<function condition="latex">par</function> in certain contexts. <doc:todo>These
203
problems should be periodically reviewed by the &db2latex; team.</doc:todo></para>
206
<simplelist type='inline'>
211
<xsl:template match="textobject/para|step/para|entry/para|question/para" name="para-noline">
212
<xsl:if test="position()>1">
213
<xsl:text> </xsl:text>
215
<xsl:apply-templates/>
216
<xsl:if test="position()<last()">
217
<xsl:text> </xsl:text>