| 1 |
<?xml version='1.0'?>
|
| 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 |
+ ############################################################################## -->
|
| 8 |
|
| 9 |
<xsl:stylesheet
|
| 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'>
|
| 13 |
|
| 14 |
<doc:reference id="mathelems" xmlns="">
|
| 15 |
<referenceinfo>
|
| 16 |
<releaseinfo role="meta">
|
| 17 |
$Id: mathelem.mod.xsl,v 1.4 2004/01/02 05:03:28 j-devenish Exp $
|
| 18 |
</releaseinfo>
|
| 19 |
<authorgroup>
|
| 20 |
&ramon;
|
| 21 |
&james;
|
| 22 |
</authorgroup>
|
| 23 |
<copyright>
|
| 24 |
<year>2000</year><year>2001</year><year>2002</year><year>2003</year><year>2004</year>
|
| 25 |
<holder>Ramon Casellas</holder>
|
| 26 |
</copyright>
|
| 27 |
<revhistory>
|
| 28 |
<doc:revision rcasver="1.4">&rev_2003_05;</doc:revision>
|
| 29 |
</revhistory>
|
| 30 |
</referenceinfo>
|
| 31 |
<title>Mathematics <filename>mathelems.mod.xsl</filename></title>
|
| 32 |
<partintro>
|
| 33 |
<para>
|
| 34 |
|
| 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
|
| 38 |
templates here.
|
| 39 |
|
| 40 |
</para>
|
| 41 |
</partintro>
|
| 42 |
</doc:reference>
|
| 43 |
|
| 44 |
<doc:template xmlns="">
|
| 45 |
<refpurpose>Process <sgmltag>mathelement</sgmltag> elements</refpurpose>
|
| 46 |
<doc:description>
|
| 47 |
<para>
|
| 48 |
Applies templates.
|
| 49 |
</para>
|
| 50 |
</doc:description>
|
| 51 |
<doc:variables>
|
| 52 |
&no_var;
|
| 53 |
</doc:variables>
|
| 54 |
</doc:template>
|
| 55 |
<xsl:template match="mathelement">
|
| 56 |
<xsl:apply-templates/>
|
| 57 |
</xsl:template>
|
| 58 |
|
| 59 |
<doc:template xmlns="">
|
| 60 |
<refpurpose>Typeset mathelement environments</refpurpose>
|
| 61 |
<doc:description>
|
| 62 |
<para>
|
| 63 |
|
| 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>
|
| 67 |
|
| 68 |
</para>
|
| 69 |
</doc:description>
|
| 70 |
<doc:variables>
|
| 71 |
&no_var;
|
| 72 |
</doc:variables>
|
| 73 |
<doc:params>
|
| 74 |
<variablelist>
|
| 75 |
<varlistentry>
|
| 76 |
<term>environment</term>
|
| 77 |
<listitem><simpara>The name of the &LaTeX; environment command.</simpara></listitem>
|
| 78 |
</varlistentry>
|
| 79 |
</variablelist>
|
| 80 |
</doc:params>
|
| 81 |
</doc:template>
|
| 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"/>
|
| 89 |
</xsl:call-template>
|
| 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>
|
| 96 |
</xsl:template>
|
| 97 |
|
| 98 |
<doc:template xmlns="">
|
| 99 |
<refpurpose>Process <sgmltag>mathelement/mathhypothesis</sgmltag> elements</refpurpose>
|
| 100 |
<doc:description>
|
| 101 |
<para>
|
| 102 |
Formats a hypothesis.
|
| 103 |
</para>
|
| 104 |
</doc:description>
|
| 105 |
<doc:variables>
|
| 106 |
&no_var;
|
| 107 |
</doc:variables>
|
| 108 |
<doc:notes>
|
| 109 |
<para>
|
| 110 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 111 |
for the <quote>hypothesis</quote> environment.
|
| 112 |
</para>
|
| 113 |
</doc:notes>
|
| 114 |
</doc:template>
|
| 115 |
<xsl:template match="mathelement/mathhypothesis">
|
| 116 |
<xsl:call-template name="mathelement.environment">
|
| 117 |
<xsl:with-param name="environment" select="'hypothesis'"/>
|
| 118 |
</xsl:call-template>
|
| 119 |
</xsl:template>
|
| 120 |
|
| 121 |
<doc:template xmlns="">
|
| 122 |
<refpurpose>Process <sgmltag>mathelement/mathremark</sgmltag> elements</refpurpose>
|
| 123 |
<doc:description>
|
| 124 |
<para>
|
| 125 |
Formats a mathematical remark.
|
| 126 |
</para>
|
| 127 |
</doc:description>
|
| 128 |
<doc:variables>
|
| 129 |
&no_var;
|
| 130 |
</doc:variables>
|
| 131 |
<doc:notes>
|
| 132 |
<para>
|
| 133 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 134 |
for the <quote>rem</quote> environment.
|
| 135 |
</para>
|
| 136 |
</doc:notes>
|
| 137 |
</doc:template>
|
| 138 |
<xsl:template match="mathelement/mathremark">
|
| 139 |
<xsl:call-template name="mathelement.environment">
|
| 140 |
<xsl:with-param name="environment" select="'rem'"/>
|
| 141 |
</xsl:call-template>
|
| 142 |
</xsl:template>
|
| 143 |
|
| 144 |
<doc:template xmlns="">
|
| 145 |
<refpurpose>Process <sgmltag>mathelement/mathexample</sgmltag> elements</refpurpose>
|
| 146 |
<doc:description>
|
| 147 |
<para>
|
| 148 |
Formats a mathematical example.
|
| 149 |
</para>
|
| 150 |
</doc:description>
|
| 151 |
<doc:variables>
|
| 152 |
&no_var;
|
| 153 |
</doc:variables>
|
| 154 |
<doc:notes>
|
| 155 |
<para>
|
| 156 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 157 |
for the <quote>exm</quote> environment.
|
| 158 |
</para>
|
| 159 |
</doc:notes>
|
| 160 |
</doc:template>
|
| 161 |
<xsl:template match="mathelement/mathexample">
|
| 162 |
<xsl:call-template name="mathelement.environment">
|
| 163 |
<xsl:with-param name="environment" select="'exm'"/>
|
| 164 |
</xsl:call-template>
|
| 165 |
</xsl:template>
|
| 166 |
|
| 167 |
<doc:template xmlns="">
|
| 168 |
<refpurpose>Process <sgmltag>mathelement/mathproposition</sgmltag> elements</refpurpose>
|
| 169 |
<doc:description>
|
| 170 |
<para>
|
| 171 |
Formats a mathematical proposition.
|
| 172 |
</para>
|
| 173 |
</doc:description>
|
| 174 |
<doc:variables>
|
| 175 |
&no_var;
|
| 176 |
</doc:variables>
|
| 177 |
<doc:notes>
|
| 178 |
<para>
|
| 179 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 180 |
for the <quote>prop</quote> environment.
|
| 181 |
</para>
|
| 182 |
</doc:notes>
|
| 183 |
</doc:template>
|
| 184 |
<xsl:template match="mathelement/mathproposition">
|
| 185 |
<xsl:call-template name="mathelement.environment">
|
| 186 |
<xsl:with-param name="environment" select="'prop'"/>
|
| 187 |
</xsl:call-template>
|
| 188 |
</xsl:template>
|
| 189 |
|
| 190 |
<doc:template xmlns="">
|
| 191 |
<refpurpose>Process <sgmltag>mathelement/maththeorem</sgmltag> elements</refpurpose>
|
| 192 |
<doc:description>
|
| 193 |
<para>
|
| 194 |
Formats a mathematical theorem.
|
| 195 |
</para>
|
| 196 |
</doc:description>
|
| 197 |
<doc:variables>
|
| 198 |
&no_var;
|
| 199 |
</doc:variables>
|
| 200 |
<doc:notes>
|
| 201 |
<para>
|
| 202 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 203 |
for the <quote>thm</quote> environment.
|
| 204 |
</para>
|
| 205 |
</doc:notes>
|
| 206 |
</doc:template>
|
| 207 |
<xsl:template match="mathelement/maththeorem">
|
| 208 |
<xsl:call-template name="mathelement.environment">
|
| 209 |
<xsl:with-param name="environment" select="'thm'"/>
|
| 210 |
</xsl:call-template>
|
| 211 |
</xsl:template>
|
| 212 |
|
| 213 |
<doc:template xmlns="">
|
| 214 |
<refpurpose>Process <sgmltag>mathelement/mathdefinition</sgmltag> elements</refpurpose>
|
| 215 |
<doc:description>
|
| 216 |
<para>
|
| 217 |
Formats a mathematical definition.
|
| 218 |
</para>
|
| 219 |
</doc:description>
|
| 220 |
<doc:variables>
|
| 221 |
&no_var;
|
| 222 |
</doc:variables>
|
| 223 |
<doc:notes>
|
| 224 |
<para>
|
| 225 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 226 |
for the <quote>defn</quote> environment.
|
| 227 |
</para>
|
| 228 |
</doc:notes>
|
| 229 |
</doc:template>
|
| 230 |
<xsl:template match="mathelement/mathdefinition">
|
| 231 |
<xsl:call-template name="mathelement.environment">
|
| 232 |
<xsl:with-param name="environment" select="'defn'"/>
|
| 233 |
</xsl:call-template>
|
| 234 |
</xsl:template>
|
| 235 |
|
| 236 |
<doc:template xmlns="">
|
| 237 |
<refpurpose>Process <sgmltag>mathelement/mathlemma</sgmltag> elements</refpurpose>
|
| 238 |
<doc:description>
|
| 239 |
<para>
|
| 240 |
Formats a mathematical lemma.
|
| 241 |
</para>
|
| 242 |
</doc:description>
|
| 243 |
<doc:variables>
|
| 244 |
&no_var;
|
| 245 |
</doc:variables>
|
| 246 |
<doc:notes>
|
| 247 |
<para>
|
| 248 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 249 |
for the <quote>lem</quote> environment.
|
| 250 |
</para>
|
| 251 |
</doc:notes>
|
| 252 |
</doc:template>
|
| 253 |
<xsl:template match="mathelement/mathlemma">
|
| 254 |
<xsl:call-template name="mathelement.environment">
|
| 255 |
<xsl:with-param name="environment" select="'lem'"/>
|
| 256 |
</xsl:call-template>
|
| 257 |
</xsl:template>
|
| 258 |
|
| 259 |
<doc:template xmlns="">
|
| 260 |
<refpurpose>Process <sgmltag>mathelement/mathproof</sgmltag> elements</refpurpose>
|
| 261 |
<doc:description>
|
| 262 |
<para>
|
| 263 |
Formats a mathematical proof.
|
| 264 |
</para>
|
| 265 |
</doc:description>
|
| 266 |
<doc:variables>
|
| 267 |
&no_var;
|
| 268 |
</doc:variables>
|
| 269 |
<doc:notes>
|
| 270 |
<para>
|
| 271 |
Calls <xref linkend="template.mathelement.environment"/>
|
| 272 |
for the <quote>proof</quote> environment.
|
| 273 |
</para>
|
| 274 |
</doc:notes>
|
| 275 |
</doc:template>
|
| 276 |
<xsl:template match="mathelement/mathproof">
|
| 277 |
<xsl:call-template name="mathelement.environment">
|
| 278 |
<xsl:with-param name="environment" select="'proof'"/>
|
| 279 |
</xsl:call-template>
|
| 280 |
</xsl:template>
|
| 281 |
|
| 282 |
<doc:template xmlns="">
|
| 283 |
<refpurpose>Process <sgmltag>mathphrase</sgmltag>, <sgmltag>mathcondition</sgmltag> and <sgmltag>mathassertion</sgmltag> elements</refpurpose>
|
| 284 |
<doc:description>
|
| 285 |
<para>
|
| 286 |
Applies templates.
|
| 287 |
</para>
|
| 288 |
</doc:description>
|
| 289 |
<doc:variables>
|
| 290 |
&no_var;
|
| 291 |
</doc:variables>
|
| 292 |
</doc:template>
|
| 293 |
<xsl:template match="mathphrase|mathcondition|mathassertion">
|
| 294 |
<xsl:apply-templates/>
|
| 295 |
</xsl:template>
|
| 296 |
|
| 297 |
</xsl:stylesheet>
|