uppercase letter are ignored when using asciimath in tynimce

41 views
Skip to first unread message

Miki Alliel

unread,
Nov 14, 2013, 4:32:54 AM11/14/13
to asci...@googlegroups.com
I have asciimath plugin in tinymce and when writing  uppercase word like Delta I suppose to get triangle but instead I see the lowercase of delta. every uppercase symbol shows lowercase instead, is 
you can test it here
just write `delta` and  `Delta`  you will get the same
there any solution for this?
Thanks
 

David Lippman

unread,
Nov 19, 2013, 9:42:44 PM11/19/13
to asci...@googlegroups.com
Yeah, that was a bug in the image fallback script. You can grab an updated replacement here: https://raw.github.com/drlippman/IMathAS/master/javascript/ASCIIMathMLwFallback.js


--
You received this message because you are subscribed to the Google Groups "ASCIIMath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asciimath+...@googlegroups.com.
To post to this group, send email to asci...@googlegroups.com.
Visit this group at http://groups.google.com/group/asciimath.
For more options, visit https://groups.google.com/groups/opt_out.


Rory Barrett

unread,
Jan 13, 2014, 6:35:26 PM1/13/14
to asci...@googlegroups.com, ror...@vodafone.co.nz

Hello Colleagues

I forgot to put the code in my previous post to follow my request:

Hello Colleagues

 

I wonder if any of you can help me.

 

The following code inserts the fraction two thirds in the document initially but subsequent button presses give `2/3`.

What am I missing ?

Here is the code. Please help.

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

  <head>

    <meta content="text/html; charset=windows-1252" http-equiv="content-type">

    <title>Toby</title>

    <script type="text/javascript" src="../../../ASCIIMathML.js"></script>

     <script type="text/javascript" >

       var x = 0;

function increase()

{

  x++;

  if (x%2 == 0)

      {

      document.getElementById("p1").innerHTML="`2/3`";

      }

  if (x%2 == 1)

      {

      document.getElementById("p1").innerHTML="spooky";

      }  

    

   }

       </script>

  </head>

  <body>

    <p id="p1">Hello World!</p>

    <script type="text/javascript" >

     

      if (x%2 == 0)

      {

      document.getElementById("p1").innerHTML="`2/3`";

      }

      //document.getElementById("p1").innerHTML="Anus";

      </script>

    <p>The paragraph above was changed by a script.</p>

    <!--works !-->

    <div align="center"><br>

       

        <input name="button" onclick="increase()" value="Try again" type="button">

      </div>

   

</p>

  </body>

</html>

 

          type="button">

      </div>

   

</p>

  </body>

</html>

David Lippman

unread,
Jan 16, 2014, 8:06:11 AM1/16/14
to asci...@googlegroups.com
The rendering of math happens once automatically, on page load.  So the button presses that happen after page load don't automatically get translated.  

The best solution is to call AMprocessNode on the node you want rendered after it's inserted:
var el = document.getElementById("p1");
el.innerHTML="`2/3`";
AMprocessNode(el);

It's also nice to note that if you ever decide to switch to MathJax, updating your script is as easy as replacing the last line:
MathJax.Hub.Queue(["Typeset", MathJax.Hub, el]); 



Reply all
Reply to author
Forward
0 new messages