Wrong image interpretation latex syntax with ASCIIMATH

Wrong image interpretation latex syntax with ASCIIMATH

by Miki Alliel -
Number of replies: 4
Picture of Translators

Hello something really wierd happend  (moodle 2.7)

this latex code: " `f(x)={(x^2-1,, -1<=x<0),(2x ,, 0<x<1),(1,, x=1),(-2x+4,, 1<x<2),(0,, 2<x<3):}`"

suppose to be like this image:

good from asciimath onlin editoe website

(Tested in this site)

But instead I get it in Moodle with one raw and wrong like this:

wrong asciimath in moodle2.7

Can anyone tell me why it happens and how can I fix that?

Average of ratings: -
In reply to Miki Alliel

Re: Wrong image interpretation latex syntax with ASCIIMATH

by Mauno Korpelainen -

Are you using AsciimathML from original javascripts or with MathJax (additional HTML vs MathJax filter) ?

With Atto (default editor in 2.7) or TinyMCE (previous default editor)?

In reply to Mauno Korpelainen

Re: Wrong image interpretation latex syntax with ASCIIMATH

by Miki Alliel -
Picture of Translators

Thanks for the reply.

I use tinyMCE IN MOODLE 2.7 and I use - Asciimath with additionalhtml this is what I put in the "additionalhtmlhead":

<script src="http://mysite.../lib/editor/tinymce/tiny_mce/3.5.10/plugins/asciimath/js/ASCIIMathMLwFallback.js" type="text/javascript"></script>

<script type="text/javascript">// <![CDATA[

var AMTcgiloc = "http://korpelainen.net/cgi-bin/mathtex.cgi";   //change me

// ]]></script>


about - AMTcgiloc = "http://korpelainen.net/cgi-bin/mathtex.cgi";

I used to use this " AMTcgiloc = "http://www.imathas.com/cgi-bin/mimetex.cgi";

but few days ago nothing worked at all no images nothing so I put this: "http://korpelainen.net/cgi-bin/mathtex.cgi"

I don't know if it has something to do with the problem I asked. anyways I don;t know also why the "http://www.imathas.com/cgi-bin/mimetex.cgi" not working anymore sad because it used to work perfectly even the rows were fine (the origin problem in the post).


In reply to Miki Alliel

Re: Wrong image interpretation latex syntax with ASCIIMATH

by Mauno Korpelainen -

Try to use only

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"> </script>

in Additional HTML instead of those other script tags - this script tag is using MathJax with default delimiters and has both AsciimathML input and output enabled.

I have no idea why http://www.imathas.com/cgi-bin/mimetex.cgi has stopped working on your site - I still get for example alpha using http://www.imathas.com/cgi-bin/mimetex.cgi?\alpha - on the other hand http://korpelainen.net/cgi-bin/mathtex.cgi is running on my test site and I get alpha with http://korpelainen.net/cgi-bin/mathtex.cgi?\alpha

The reason might be that some other script or setting (filter???) could interrupt your javascripts (have some conflict) or remove backticks before the asciimathml javascripts had even been used...

Do you see any errors in browser javascript console (F12 in IE or Inspect element in FF/Chrome) or other error logs / debugging ?

In reply to Mauno Korpelainen

Re: Wrong image interpretation latex syntax with ASCIIMATH

by Miki Alliel -
Picture of Translators

There was no error in the browsers.

But now I changed back to "http://www.imathas.com/cgi-bin/mimetex.cgi"  and it works fine suddenly  I see the 

s

Maybe there was a problem with this site for few days? can I count on it?

Chould I leave it like this now? or put what you suggested.

I tried also to put only what you suggested and it works fine too so what to pick? smile

By the way - and I have the following filters too that are available :TeX notation and MathJax