2 <!--#############################################################################
3 |- #############################################################################
6 + ############################################################################## -->
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'>
16 <!--############################################################################# -->
17 <!-- DOCUMENTATION -->
18 <doc:reference id="texmath" xmlns="">
20 <releaseinfo role="meta">
23 <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
24 <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
27 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
28 <holder>Ramon Casellas</holder>
32 <title>LaTeX Only Commands <filename>texmath.mod.xsl</filename></title>
34 <section><title>Introduction</title>
40 <xsl:template match="alt">
42 <xsl:when test="ancestor::inlineequation and (@role='tex' or @role='latex' or $latex.alt.is.latex='1')">
43 <xsl:text>\ensuremath{</xsl:text>
44 <xsl:value-of select="."/>
45 <xsl:text>}</xsl:text>
47 <xsl:when test="ancestor::equation|ancestor::informalequation and (@role='tex' or @role='latex' or $latex.alt.is.latex='1')">
48 <xsl:text>\begin{displaymath}</xsl:text>
49 <xsl:call-template name="label.id"/>
50 <xsl:value-of select="."/>
51 <xsl:text>\end{displaymath} </xsl:text>
53 <xsl:when test="$latex.alt.is.latex='1'">
54 <xsl:value-of select="."/>
57 <xsl:apply-templates/>
62 <xsl:template match="latex|tex">
63 <xsl:value-of select="."/>
66 <xsl:template match="latex[@fileref]">
67 <xsl:text>\input{</xsl:text><xsl:value-of select="@fileref"/><xsl:text>} </xsl:text>
70 <xsl:template match="tex[@fileref]">
71 <xsl:text>\input{</xsl:text><xsl:value-of select="@fileref"/><xsl:text>} </xsl:text>
75 <xsl:template match="tm[@fileref]">
76 <xsl:text>\input{</xsl:text><xsl:value-of select="@fileref"/><xsl:text>} </xsl:text>
79 <xsl:template match="tm[@tex]">
80 <xsl:value-of select="@tex"/>
83 <xsl:template match="inlinetm[@fileref]">
84 <xsl:text>\input{</xsl:text><xsl:value-of select="@fileref"/><xsl:text>} </xsl:text>
87 <xsl:template match="inlinetm[@tex]">
88 <xsl:value-of select="@tex"/>
92 <xsl:template match="inlineequation">
93 <xsl:variable name="tex" select="alt[@role='tex' or @role='latex']|inlinemediaobject/textobject[@role='tex' or @role='latex']|inlinemediaobject/textobject/phrase[@role='tex' or @role='latex']" />
95 <xsl:when test="$tex">
96 <xsl:apply-templates select="$tex"/>
98 <xsl:when test="alt and $latex.alt.is.preferred='1'">
99 <xsl:apply-templates select="alt"/>
101 <xsl:when test="inlinemediaobject">
102 <xsl:apply-templates select="inlinemediaobject"/>
104 <xsl:when test="alt">
105 <xsl:apply-templates select="alt"/>
108 <xsl:apply-templates select="graphic"/>