----- Original Message ----- From: Waldek Hebisch <address@hidden> Date: Sunday, December 16, 2007 11:35 am Subject: [Axiom-developer] Re: [fricas-devel] mathml hex(10) patch To: address@hidden Cc: address@hidden
> Ralpf, > > You wrote: > > Tim, Waldek,<br><br>This patch is a band-aid for the > hex(10) bug. > <snip> > > @@ -1285,6 +1307,10 @@ > > -- where it arises. Removed 2007-02-14 > > concat(concat("<mtext>",str),"</mtext>") > > -- if we get to here does that mean it's a variable? > > + -- test for something like #\A and strip off #\ > > + str.1 = char "#" and str.2 = char "\" => > > > + u : US := segment(3,len)$US > > > + concat ["<mi>",str.u,"</mi>"] > > concat > ["<mi>",str,"</mi>"]> l : L E := (expr pretend L E) > > null l => blank > > > > I wonder if we can get here with a string -- for string this is > clearly wrong. AFAICS the start of 'hex(10)' problem is in > the line: > > stringify expr == (object2String$Lisp expr)@S > > object2String converts character using _Lisp_ rules: > > object2String x == > STRINGP x => x > IDENTP x => PNAME x > NULL x => '"" > PAIRP x => STRCONC(object2String first x, > object2String rest x) > WRITE_-TO_-STRING x > > so you get '#\A' here. I am not sure if we ever want '#\A' in > "math" output -- if no we could just use a function which would > convert characters to length 1 strings. > Do you think we can rewrite the stringify function to do the right thing? I'm not sure how to proceed. I copied stringify from the TeX domain.