]> matita.cs.unibo.it Git - helm.git/commitdiff
1) Sequent object added.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 8 Apr 2002 11:05:59 +0000 (11:05 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 8 Apr 2002 11:05:59 +0000 (11:05 +0000)
2) Current Proof and META rendering improved.

helm/style/content.xsl
helm/style/mmlextension.xsl
helm/style/objcontent.xsl

index 95a1f66b23a0d8bbb8a912f3f97e79d9b958c5d3..ef9c297a66366db83f93bb14957f0e266b39bed7 100644 (file)
@@ -169,7 +169,7 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
 
 <xsl:template match="META" mode="pure">
     <m:ci helm:xref="{@id}">
-     <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="@no"/></xsl:with-param></xsl:call-template>
+     <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value">?<xsl:value-of select="@no"/></xsl:with-param></xsl:call-template>
     </m:ci>
 </xsl:template>
 
index b9cd3165ef2bc2e4d1e98ed03d4fb4ce686950a6..f92205008f00708b89415de1a5adb9c55ed34896 100644 (file)
@@ -183,7 +183,8 @@ which generates the toplevel element (see for instance xlink) -->
        <m:mtd>
         <m:mrow>
          <m:mphantom><m:mtext>__</m:mtext></m:mphantom>
-         <m:mtext><xsl:value-of select="./@no"/>:</m:mtext>
+         <m:msub><m:mi>?</m:mi><m:mn><xsl:value-of select="@no"/></m:mn></m:msub>
+         <m:mtext>:</m:mtext>
          <xsl:apply-templates select="./*[1]"/>
         </m:mrow>
        </m:mtd>
@@ -192,7 +193,7 @@ which generates the toplevel element (see for instance xlink) -->
       <m:mtr>
        <m:mtd>
         <m:mrow>
-         <m:mtext>CORRESPONDING PROOF:</m:mtext>
+         <m:mtext>PROOF:</m:mtext>
         </m:mrow>
        </m:mtd>
       </m:mtr>
@@ -360,6 +361,47 @@ which generates the toplevel element (see for instance xlink) -->
     </m:math>
 </xsl:template>
 
+<!-- SEQUENT -->
+
+<xsl:template match="Sequent">
+    <m:math>
+     <m:mtable align="baseline 1" equalrows="false" columnalign="left" helm:xref="{@helm:xref}">
+      <xsl:for-each select="Declaration|Definition">
+       <m:mtr>
+        <m:mtd>
+         <m:mrow>
+          <m:mi><xsl:value-of select="@name"/></m:mi>
+          <xsl:choose>
+           <xsl:when test="name(.) = 'Declaration'">
+            <m:mo>:</m:mo>
+           </xsl:when>
+           <xsl:otherwise>
+            <m:mo>:=</m:mo>
+           </xsl:otherwise>
+          </xsl:choose>
+          <xsl:apply-templates select="*[1]"/>
+         </m:mrow>
+        </m:mtd>
+       </m:mtr>
+      </xsl:for-each>
+      <m:mtr>
+       <m:mtd>
+        <m:mrow>
+         <m:mtext>========================================</m:mtext>
+        </m:mrow>
+       </m:mtd>
+      </m:mtr>
+      <m:mtr>
+       <m:mtd>
+        <m:mrow>
+         <xsl:apply-templates select="Goal/*[1]"/>
+        </m:mrow>
+       </m:mtd>
+      </m:mtr>
+     </m:mtable>
+    </m:math>
+</xsl:template>
+
 <!--**********************-->
 <!--        TERMS         -->
 <!--**********************-->
index 9b98250511fba36ef67907a29c777035ad1ab7ff..aef9daa6b666828280ec4a2b6bf1b8302c37f74b 100644 (file)
 
 <!-- CIC OBJECTS -->
 
+<xsl:template match="Sequent">  <!-- For Sequents there are no annotations --> 
+    <Sequent helm:xref="{@id}">
+     <xsl:for-each select="Declaration|Definition">
+      <xsl:copy>
+       <xsl:attribute name="name">
+        <xsl:value-of select="@name"/>
+       </xsl:attribute>
+       <xsl:apply-templates select="*[1]"/>
+      </xsl:copy>
+     </xsl:for-each>
+     <Goal>
+      <xsl:apply-templates select="Goal/*[1]"/>
+     </Goal>
+    </Sequent> 
+</xsl:template>
+
 <xsl:template match="Definition" mode="noannot">
     <Definition name="{@name}" helm:xref="{@id}">  
      <xsl:if test="string(@params) != &quot;&quot;">
 <xsl:template match="CurrentProof" mode="noannot">
     <CurrentProof name="{@name}" helm:xref="{@id}">
      <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
+      <Conjecture no="{@no}">
         <xsl:apply-templates select="."/>
       </Conjecture>
      </xsl:for-each>