]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/xsl/tml-mmlp.xsl
Branch V7_3_new_exportation merged.
[helm.git] / helm / DEVEL / mathml_editor / xsl / tml-mmlp.xsl
index 7b1ad7cb3ca4d9a9d3aace5e06223f19bf85cfac..f5e1b6f74cc415601a2169432cb91acf011f7963 100644 (file)
     </xsl:choose>
   </xsl:template>
 
+  <xsl:template match="tml:tex[not(tml:math)]">
+    <!-- This is an empty TeX document. We generate the corresponding  -->
+    <!-- empty MathML document.                                        -->
+    <m:math/>
+  </xsl:template>
+
   <xsl:template match="tml:math">
     <m:math>
       <xsl:if test="@id">
     </m:mo>
   </xsl:template>
 
-  <xsl:template match="tml:cursor[@visible='1']">
+  <xsl:template match="tml:cursor">
     <xsl:choose>
       <xsl:when test="substring(@val,1,1)='\'">
         <m:mrow>
              </m:mi>
            </xsl:otherwise>
          </xsl:choose>
-         <m:mtext mathcolor="blue">I</m:mtext>
+         <xsl:if test="@visible='1'">
+          <m:mtext mathcolor="blue">I</m:mtext>
+         </xsl:if>
        </m:mrow>
       </xsl:when>
       <xsl:otherwise>
-        <m:mtext mathcolor="blue">
-         <xsl:if test="@id">
-           <xsl:attribute name="xref">
-             <xsl:value-of select="@id"/>
-           </xsl:attribute>
-         </xsl:if><xsl:value-of select="@val"/>I</m:mtext>
+       <xsl:if test="@visible='1'">
+         <m:mtext mathcolor="blue">
+          <xsl:if test="@id">
+            <xsl:attribute name="xref">
+              <xsl:value-of select="@id"/>
+            </xsl:attribute>
+          </xsl:if>
+         <xsl:text>I</xsl:text>
+        </m:mtext>
+       </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
-  </xsl:template>-->
-
-  <xsl:template match="tml:cursor[not(@visible) or @visible='0']">
   </xsl:template>
 
   <xsl:template match="tml:sb[@under='1'][*[1]/tml:sp[@over='1']]">
     </m:mstyle>
   </xsl:template>
 
+  <xsl:template match="tml:c[@name='_']">
+<!-- _ -->
+    <m:mi>
+      <xsl:if test="@id">
+        <xsl:attribute name="xref">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:text>_</xsl:text>
+    </m:mi>
+  </xsl:template>
+
   <xsl:template match="tml:c[@name=',']">
 <!-- , -->
     <m:mspace width="thinmathspace">
     </m:mfrac>
   </xsl:template>
 
-  <xsl:template match="tml:c[@name='space']">
-    <m:mspace width="veryverythickmathspace">
-    </m:mspace>
-  </xsl:template>
 </xsl:stylesheet>