2 <!--#############################################################################
3 | $Id: mathelem.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
4 |- #############################################################################
7 | PURPOSE: Math Elements as theorems, lemmas, propositions, etc.
8 | Note: these elements are not part of the DocBook DTD. I have extended
9 | the docbook DTD in order to support this tags, so that's why I have these
11 + ############################################################################## -->
14 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
16 exclude-result-prefixes="doc" version='1.0'>
20 <!--############################################################################# -->
21 <!-- DOCUMENTATION -->
22 <doc:reference id="mathelems" xmlns="">
24 <releaseinfo role="meta">
25 $Id: mathelem.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
28 <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
29 <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
32 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
33 <holder>Ramon Casellas</holder>
37 <title>Math Elements <filename>mathelems.mod.xsl</filename></title>
39 <section><title>Introduction</title>
48 <xsl:template match="mathelement">
49 <xsl:apply-templates/>
54 ##########################################
56 # \begin{hypothesis}[title]
60 ##########################################
62 <xsl:template match="mathelement/mathhypothesis">
63 <xsl:text>\begin{hypothesis}[</xsl:text>
64 <xsl:call-template name="normalize-scape">
65 <xsl:with-param name="string" select="title"/>
67 <xsl:text>] </xsl:text>
68 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
69 <xsl:apply-templates/>
70 <xsl:text>\end{rem} </xsl:text>
74 ##########################################
80 ##########################################
82 <xsl:template match="mathelement/mathremark">
83 <xsl:text>\begin{rem}[</xsl:text>
84 <xsl:call-template name="normalize-scape">
85 <xsl:with-param name="string" select="title"/>
87 <xsl:text>] </xsl:text>
88 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
89 <xsl:apply-templates/>
90 <xsl:text>\end{rem} </xsl:text>
95 ##########################################
101 ##########################################
103 <xsl:template match="mathelement/mathexample">
104 <xsl:text>\begin{exm}[</xsl:text>
105 <xsl:call-template name="normalize-scape">
106 <xsl:with-param name="string" select="title"/>
108 <xsl:text>] </xsl:text>
109 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
110 <xsl:apply-templates/>
111 <xsl:text>\end{exm} </xsl:text>
116 ##########################################
118 # \begin{prop}[title]
122 ##########################################
124 <xsl:template match="mathelement/mathproposition">
125 <xsl:text>\begin{prop}[</xsl:text>
126 <xsl:call-template name="normalize-scape">
127 <xsl:with-param name="string" select="title"/>
129 <xsl:text>] </xsl:text>
130 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
131 <xsl:apply-templates/>
132 <xsl:text>\end{prop} </xsl:text>
137 ##########################################
143 ##########################################
145 <xsl:template match="mathelement/maththeorem">
146 <xsl:text>\begin{thm}[</xsl:text>
147 <xsl:call-template name="normalize-scape">
148 <xsl:with-param name="string" select="title"/>
150 <xsl:text>] </xsl:text>
151 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
152 <xsl:apply-templates/>
153 <xsl:text>\end{thm} </xsl:text>
159 ##########################################
161 # \begin{defn}[definition title]
165 ##########################################
167 <xsl:template match="mathelement/mathdefinition">
168 <xsl:text>\begin{defn}[</xsl:text>
169 <xsl:call-template name="normalize-scape">
170 <xsl:with-param name="string" select="title"/>
172 <xsl:text>] </xsl:text>
173 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
174 <xsl:apply-templates/>
175 <xsl:text>\end{defn} </xsl:text>
181 ##########################################
183 # \begin{lem}[lemma title]
187 ##########################################
189 <xsl:template match="mathelement/mathlemma">
190 <xsl:text>\begin{lem}[</xsl:text>
191 <xsl:call-template name="normalize-scape">
192 <xsl:with-param name="string" select="title"/>
194 <xsl:text>] </xsl:text>
195 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
196 <xsl:apply-templates/>
197 <xsl:text>\end{lem} </xsl:text>
202 ##########################################
208 ##########################################
210 <xsl:template match="mathproof">
211 <xsl:text>\begin{proof}</xsl:text>
212 <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
213 <xsl:apply-templates/>
214 <xsl:text>\end{proof} </xsl:text>
218 <xsl:template match="mathphrase|mathcondition|mathassertion">
219 <xsl:apply-templates/>
222 <xsl:template match="mathelement/*/title">