axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20071205.01.tpd.patch


From: daly
Subject: [Axiom-developer] 20071205.01.tpd.patch
Date: Wed, 5 Dec 2007 19:14:17 -0600

This patch contains two posted bug fixes by Waldek for mathml.

bug 7014: Cannot take first of an empty list
fixed by waldek patch 20071205.01.tpd.patch

)set out mathml on
z:=continuedFraction(3,repeating [1],repeating [3,6])

   (7)
           1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |
     3 + +---+ + +---+ + +---+ + +---+ + +---+ + +---+ + +---+ + +---+ + +---+
         | 3     | 6     | 3     | 6     | 3     | 6     | 3     | 6     | 3
   + 
       1 |
     +---+ + ...
     | 6
 
   >> System error:
   Cannot take first of an empty list



bug 7016: display of %%var is wrong
fixed by waldek patch 20071205.01.tpd.patch

)set out mathml on
zerosOf(y**4+1,y)
definingPolynomial %y1
   %%var^2+1
but the mathml shows
   var^2+1



============================================================================
diff --git a/changelog b/changelog
index cb6b97b..e553040 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20071205 wxh src/algebra/mathml fix empty list on continuedFraction bug (7014)
+20071205 wxh src/algebra/mathml remove code to eat %% (bug 7016)
 20071129 tpd zips/axiomfonts.tgz remove fonts, change instructions
 20071129 tpd zips/axiomfonts.tgz add mathml fonts
 20071119 tpd Makefile.pamphlet add fedora6,7,8 stanzas
diff --git a/src/algebra/mathml.spad.pamphlet b/src/algebra/mathml.spad.pamphlet
index f704c76..e5eaaf7 100644
--- a/src/algebra/mathml.spad.pamphlet
+++ b/src/algebra/mathml.spad.pamphlet
@@ -1227,7 +1227,9 @@ have to be switched by swapping names.
     -- {{ZAG}{1}{7}}
       tmpZag : L E := first args pretend L E
       #args > 1 => "<mfrac>"formatMml(first rest 
tmpZag,minPrec)"<mrow><mn>"formatMml(first rest rest 
tmpZag,minPrec)"</mn><mo>+</mo>"formatZag(rest args)"</mrow></mfrac>"
-      "<mfrac>"formatMml(first rest tmpZag,minPrec)formatMml(first rest rest 
tmpZag,minPrec)"</mfrac>"
+      -- EQUAL(tmpZag, "...")$Lisp => "<mo>&#x2026;</mo>"
+      (first args = "...":: E)@Boolean => "<mo>&#x2026;</mo>"
+      error "formatZag: Unexpected kind of ZAG"
       
     formatZag1(args : L E) : S ==
     -- make alternative ZAG format without diminishing fonts, maybe
@@ -1235,7 +1237,9 @@ have to be switched by swapping names.
     -- {{ZAG}{1}{7}}
       tmpZag : L E := first args pretend L E
       #args > 1 => "<mfrac>"formatMml(first rest 
tmpZag,minPrec)"<mrow><mn>"formatMml(first rest rest 
tmpZag,minPrec)"</mn><mo>+</mo>"formatZag(rest args)"</mrow></mfrac>"
-      "<mfrac>"formatMml(first rest tmpZag,minPrec)formatMml(first rest rest 
tmpZag,minPrec)"</mfrac>"
+      (first args = "...":: E)@Boolean => "<mo>&#x2026;</mo>"
+      error "formatZag1: Unexpected kind of ZAG"
+
 
     formatMml(expr : E,prec : I) ==
       i,len : Integer
@@ -1267,10 +1271,6 @@ have to be switched by swapping names.
        -- ExponentialE
         str = "%i"  => "<mi>&#x02148;</mi>"
        -- ImaginaryI
-       -- what sort of atom starts with %%? need an example
-        len > 1 and str.1 = char "%" and str.2 = char "%" =>
-          u : US := segment(3,len)$US
-          concat(concat("<mi>",str.u),"</mi>")
         len > 0 and str.1 = char "%" => concat(concat("<mi>",str),"</mi>")
         len > 1 and digit? str.1 => concat ["<mn>",str,"</mn>"] -- should 
handle floats
        -- presumably this is a literal string




reply via email to

[Prev in Thread] Current Thread [Next in Thread]