]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/xsl/tml-tex.xsl
* changed handling of ' (\primes) with a few patches in the stylesheets
[helm.git] / helm / DEVEL / mathml_editor / xsl / tml-tex.xsl
index a8b9878d82f74258ed9e55182e39468f19e5668a..b5c6fdf3c418b6da8d0cdf4e838d3bd6a62a5df7 100644 (file)
@@ -45,7 +45,7 @@
   <xsl:template match="tml:n">
     <xsl:choose>
       <xsl:when test="@name">\<xsl:value-of select="@name"/>
-        <xsl:if test="parent::tml:g and following-sibling::tml:n"><xsl:value-of select="' '"/></xsl:if>
+        <xsl:if test="parent::tml:g and following-sibling::tml:i"><xsl:value-of select="' '"/></xsl:if>
       </xsl:when>
       <xsl:when test="string-length(@val)=1"><xsl:value-of select="@val"/></xsl:when>
       <xsl:otherwise>{\rm <xsl:value-of select="@val"/>}</xsl:otherwise>
@@ -54,7 +54,9 @@
 
   <xsl:template match="tml:o">
     <xsl:choose>
-      <xsl:when test="@name">\<xsl:value-of select="@name"/><xsl:value-of select="' '"/></xsl:when>
+      <xsl:when test="@name">\<xsl:value-of select="@name"/>
+        <xsl:if test="parent::tml:g and following-sibling::tml:i"><xsl:value-of select="' '"/></xsl:if>
+      </xsl:when>
       <xsl:when test="string-length(@val)=1"><xsl:value-of select="@val"/></xsl:when>
       <xsl:otherwise><xsl:value-of select="@val"/></xsl:otherwise>
     </xsl:choose>
@@ -84,6 +86,8 @@
 
   <xsl:template match="tml:g[@id]">{<xsl:apply-templates select="*"/>}</xsl:template>
 
+  <xsl:template match="tml:g[count(*)&gt;1]">{<xsl:apply-templates select="*"/>}</xsl:template>
+
   <xsl:template match="tml:g">
     <xsl:apply-templates select="*"/>
   </xsl:template>