2
<!DOCTYPE xsl:stylesheet [ <!ENTITY % xsldoc.ent SYSTEM "./xsldoc.ent"> %xsldoc.ent; ]>
3
<!--#############################################################################
4
| $Id: mathelem.mod.xsl,v 1.4 2004/01/02 05:03:28 j-devenish Exp $
5
|- #############################################################################
6
| $Author: j-devenish $
7
+ ############################################################################## -->
10
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
12
exclude-result-prefixes="doc" version='1.0'>
14
<doc:reference id="mathelems" xmlns="">
16
<releaseinfo role="meta">
17
$Id: mathelem.mod.xsl,v 1.4 2004/01/02 05:03:28 j-devenish Exp $
24
<year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
25
<holder>Ramon Casellas</holder>
28
<doc:revision rcasver="1.4">&rev_2003_05;</doc:revision>
31
<title>Mathematics <filename>mathelems.mod.xsl</filename></title>
35
Mathelements as theorems, lemmas, propositions, etc. Note: these
36
elements are not part of the &DocBook; DTD. I have extended the
37
&DocBook; in order to support this tags, so that's why I have these
44
<doc:template xmlns="">
45
<refpurpose>Process <sgmltag>mathelement</sgmltag> elements</refpurpose>
55
<xsl:template match="mathelement">
56
<xsl:apply-templates/>
59
<doc:template xmlns="">
60
<refpurpose>Typeset mathelement environments</refpurpose>
64
Applies templates within the specified &LaTeX; environment,
65
with a title from any <doc:db>title</doc:db> child.
66
<doc:todo>No hypertarget is generated.</doc:todo>
76
<term>environment</term>
77
<listitem><simpara>The name of the &LaTeX; environment command.</simpara></listitem>
82
<xsl:template name="mathelement.environment">
83
<xsl:param name="environment" select="'hypothesis'"/>
84
<xsl:text>\begin{</xsl:text>
85
<xsl:value-of select="$environment"/>
86
<xsl:text>}[{</xsl:text>
87
<xsl:call-template name="normalize-scape">
88
<xsl:with-param name="string" select="title"/>
90
<xsl:text>}] </xsl:text>
91
<xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
92
<xsl:call-template name="content-templates"/>
93
<xsl:text>\end{</xsl:text>
94
<xsl:value-of select="$environment"/>
95
<xsl:text>} </xsl:text>
98
<doc:template xmlns="">
99
<refpurpose>Process <sgmltag>mathelement/mathhypothesis</sgmltag> elements</refpurpose>
102
Formats a hypothesis.
110
Calls <xref linkend="template.mathelement.environment"/>
111
for the <quote>hypothesis</quote> environment.
115
<xsl:template match="mathelement/mathhypothesis">
116
<xsl:call-template name="mathelement.environment">
117
<xsl:with-param name="environment" select="'hypothesis'"/>
121
<doc:template xmlns="">
122
<refpurpose>Process <sgmltag>mathelement/mathremark</sgmltag> elements</refpurpose>
125
Formats a mathematical remark.
133
Calls <xref linkend="template.mathelement.environment"/>
134
for the <quote>rem</quote> environment.
138
<xsl:template match="mathelement/mathremark">
139
<xsl:call-template name="mathelement.environment">
140
<xsl:with-param name="environment" select="'rem'"/>
144
<doc:template xmlns="">
145
<refpurpose>Process <sgmltag>mathelement/mathexample</sgmltag> elements</refpurpose>
148
Formats a mathematical example.
156
Calls <xref linkend="template.mathelement.environment"/>
157
for the <quote>exm</quote> environment.
161
<xsl:template match="mathelement/mathexample">
162
<xsl:call-template name="mathelement.environment">
163
<xsl:with-param name="environment" select="'exm'"/>
167
<doc:template xmlns="">
168
<refpurpose>Process <sgmltag>mathelement/mathproposition</sgmltag> elements</refpurpose>
171
Formats a mathematical proposition.
179
Calls <xref linkend="template.mathelement.environment"/>
180
for the <quote>prop</quote> environment.
184
<xsl:template match="mathelement/mathproposition">
185
<xsl:call-template name="mathelement.environment">
186
<xsl:with-param name="environment" select="'prop'"/>
190
<doc:template xmlns="">
191
<refpurpose>Process <sgmltag>mathelement/maththeorem</sgmltag> elements</refpurpose>
194
Formats a mathematical theorem.
202
Calls <xref linkend="template.mathelement.environment"/>
203
for the <quote>thm</quote> environment.
207
<xsl:template match="mathelement/maththeorem">
208
<xsl:call-template name="mathelement.environment">
209
<xsl:with-param name="environment" select="'thm'"/>
213
<doc:template xmlns="">
214
<refpurpose>Process <sgmltag>mathelement/mathdefinition</sgmltag> elements</refpurpose>
217
Formats a mathematical definition.
225
Calls <xref linkend="template.mathelement.environment"/>
226
for the <quote>defn</quote> environment.
230
<xsl:template match="mathelement/mathdefinition">
231
<xsl:call-template name="mathelement.environment">
232
<xsl:with-param name="environment" select="'defn'"/>
236
<doc:template xmlns="">
237
<refpurpose>Process <sgmltag>mathelement/mathlemma</sgmltag> elements</refpurpose>
240
Formats a mathematical lemma.
248
Calls <xref linkend="template.mathelement.environment"/>
249
for the <quote>lem</quote> environment.
253
<xsl:template match="mathelement/mathlemma">
254
<xsl:call-template name="mathelement.environment">
255
<xsl:with-param name="environment" select="'lem'"/>
259
<doc:template xmlns="">
260
<refpurpose>Process <sgmltag>mathelement/mathproof</sgmltag> elements</refpurpose>
263
Formats a mathematical proof.
271
Calls <xref linkend="template.mathelement.environment"/>
272
for the <quote>proof</quote> environment.
276
<xsl:template match="mathelement/mathproof">
277
<xsl:call-template name="mathelement.environment">
278
<xsl:with-param name="environment" select="'proof'"/>
282
<doc:template xmlns="">
283
<refpurpose>Process <sgmltag>mathphrase</sgmltag>, <sgmltag>mathcondition</sgmltag> and <sgmltag>mathassertion</sgmltag> elements</refpurpose>
293
<xsl:template match="mathphrase|mathcondition|mathassertion">
294
<xsl:apply-templates/>