]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/html_reals.xsl
Initial revision
[helm.git] / helm / style / html_reals.xsl
index 15071579ab569b2d05eff9fbd1880d62be78fbaf..a78f454bdc490d7b625eb6a04eccfa0553555fb9 100644 (file)
@@ -41,6 +41,9 @@
       <xsl:when test="$symbol = 'leadsto'">
        <xsl:value-of select="'&#174;'"/>
       </xsl:when>
+      <xsl:when test="$symbol = 'sum'">
+       <xsl:value-of select="'&#229;'"/>
+      </xsl:when>
       <xsl:otherwise>
        <xsl:text>???</xsl:text>
       </xsl:otherwise>
@@ -56,6 +59,9 @@
       <xsl:when test="$symbol = 'leadsto'">
        <xsl:value-of select="'&#8594;'"/>
       </xsl:when>
+      <xsl:when test="$symbol = 'sum'">
+       <xsl:value-of select="'&#x02211;'"/>
+      </xsl:when>
       <xsl:otherwise>
        <xsl:text>???</xsl:text>
       </xsl:otherwise>
 <!--                   INLINE MODE                                    -->
 <!-- **************************************************************** -->
 
+<!-- SUM -->
+
+<xsl:template mode="inline" match="m:apply[m:sum]">
+     <xsl:variable name="uri">
+      <xsl:value-of select="m:sum/@definitionURL"/>
+     </xsl:variable>
+     <xsl:choose>
+      <xsl:when test="$uri != ''">
+       <a href="{$uri}">
+       <!-- 
+       <FONT FACE="symbol" color="'blue'">
+        <xsl:value-of select="'&#229;'"/>
+       </FONT> -->
+       <xsl:call-template name="mksymbol-reals">
+        <xsl:with-param name="symbol" select="'sum'"/>
+      </xsl:call-template>
+       </a>
+      </xsl:when>
+      <xsl:otherwise>
+       <!-- 
+       <FONT FACE="symbol" color="'blue'">
+        <xsl:value-of select="'&#229;'"/>
+       </FONT> -->
+       <xsl:call-template name="mksymbol-reals">
+        <xsl:with-param name="symbol" select="'sum'"/>
+       </xsl:call-template>
+      </xsl:otherwise>
+     </xsl:choose>
+     <xsl:choose>
+      <xsl:when test="m:condition">
+       <SUB>
+        <xsl:apply-templates select="m:condition"/>
+       </SUB>
+      </xsl:when>
+      <xsl:otherwise>
+       <SUB>
+        <xsl:apply-templates select="m:lowlimit/*[1]"/>
+        <xsl:call-template name="mksymbol-init">
+         <xsl:with-param name="symbol" select="'leq'"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="m:bvar/*[1]"/>
+        <xsl:call-template name="mksymbol-init">
+         <xsl:with-param name="symbol" select="'leq'"/>
+        </xsl:call-template>
+        <xsl:apply-templates select="m:uplimit/*[1]"/>
+       </SUB>
+      </xsl:otherwise>
+     </xsl:choose>
+     <xsl:apply-templates mode="inline" select="*[position()=last()]"/>
+ </xsl:template>
+
+
 <!-- LIMIT -->
 
 
 <!--                   COUNTING MODE                                    -->
 <!-- **************************************************************** -->
 
+<xsl:template match="m:apply[m:sum]">
+ <xsl:apply-templates mode="inline" select="."/>
+</xsl:template>
 
 <xsl:template match="m:apply[m:limit]">
   <xsl:param name="current_indent" select="0"/> 
 
 <!-- COUNTING -->
 
-<xsl:template match="m:abs|m:fact|m:root
-           |m:limit|m:diff|m:min|m:max" mode="charcount">
+<xsl:template match="m:abs|m:fact|m:root|
+           m:sum|m:limit|m:diff|m:min|m:max" mode="charcount">
 <xsl:param name="incurrent_length" select="0"/> 
     <xsl:choose>
     <xsl:when test="$framewidth >= ($incurrent_length + string-length())">