Re: AsciiMath Power issue, only letters f and g

33 views
Skip to first unread message

David Lippman

unread,
Apr 9, 2013, 12:16:31 PM4/9/13
to asci...@googlegroups.com
I'm guessing that is an unintended consequence of f and g being treated as functions, which allows f(x)/3 to display as (f(x))/3, while k(x)/3 will display as k x/3.  This could probably be corrected by changing the lines

      if (typeof symbol.func == "boolean" && symbol.func) { // functions hack
        st = str.charAt(0);
        if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") {

to say

      if (typeof symbol.func == "boolean" && symbol.func) { // functions hack
        st = str.charAt(0);
        if (st=="^" || st=="_" || st=="/" || st=="|" || st=="," || st=="+" || st=="-") {

or perhaps even

      if (typeof symbol.func == "boolean" && symbol.func) { // functions hack
        st = str.charAt(0);
        if (st!="(" && st!="[") {


On Tuesday, April 9, 2013 3:10:47 AM UTC-7, Frans Morville wrote:
Thanks for AsciiMath, which I use a lot via Mathjax!

I get a strange result in Firefox when I insert this on the test page, http://www1.chapman.edu/~jipsen/mathml/asciimathdemo.html

amath

2^e + 2^f + 2^g + 2^h + 2^a

The  plus signs after f and g  print in a strange way. See the dump.

Yours 
Frans Morville

Reply all
Reply to author
Forward
0 new messages