1 <xsl:stylesheet version = '1.0'
 
   2 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
 
   3 xmlns:ldf="http://planet-sl.org/ldf"
 
   4 xmlns:mml="http://www.w3.org/1998/Math/MathML">
 
   6 <xsl:output method="txt" encoding="utf-8" omit-xml-declaration="yes"/> 
 
   8 <xsl:template match="mtext">
 
   9         <xsl:text>\textrm{</xsl:text>
 
  10         <xsl:apply-templates select="node()"/>
 
  11         <xsl:text>}</xsl:text>
 
  14 <xsl:template match="mi">
 
  15         <xsl:value-of select="."/>
 
  18 <xsl:template match="mn">
 
  19         <xsl:value-of select="."/>
 
  22 <xsl:template match="mo">
 
  23         <xsl:value-of select="."/>
 
  26 <xsl:template match="msup">
 
  27         <xsl:text>{</xsl:text>
 
  28         <xsl:apply-templates select="*[1]"/>
 
  29         <xsl:text>}^{</xsl:text>
 
  30         <xsl:apply-templates select="*[2]"/>
 
  31         <xsl:text>}</xsl:text>
 
  34 <xsl:template match="msub">
 
  35         <xsl:text>{</xsl:text>
 
  36         <xsl:apply-templates select="*[1]"/>
 
  37         <xsl:text>}_{</xsl:text>
 
  38         <xsl:apply-templates select="*[2]"/>
 
  39         <xsl:text>}</xsl:text>
 
  42 <xsl:template match="mrow">
 
  43         <xsl:text>{</xsl:text>
 
  44         <xsl:apply-templates select="node()"/>
 
  45         <xsl:text>}</xsl:text>
 
  48 <xsl:template match="mfenced">
 
  49         <xsl:text>(</xsl:text>
 
  50         <xsl:apply-templates select="node()"/>
 
  51         <xsl:text>)</xsl:text>
 
  54 <xsl:template match="mfrac">
 
  55         <xsl:text>\frac{</xsl:text>
 
  56         <xsl:apply-templates select="*[1]"/>
 
  57         <xsl:text>}{</xsl:text>
 
  58         <xsl:apply-templates select="*[2]"/>
 
  59         <xsl:text>}</xsl:text>
 
  62 <xsl:template match="varepsilon">
 
  63         <xsl:text>\varepsilon </xsl:text>