Forum: developers


RE: headmathjax [ Reply ] By: joke evers on 2016-10-19 09:17 | [forum:17698] |
I do not think the problem is caused by some error in MathJaX But I guess itś a safari thing... As you are interested in facts: Before mathjax v2.6: all (!) non gecko browser had a javascript error with an input field. We could correct it with a temporary fix using ¨textareas¨. The problem was in mathjax not really following HTML5 directives for ¨annotation¨ With mathjax v2.6: windows NT,8,10 with non-gecko browsers Opera,Chrome, IE8,IE9,Edge perform excellent with Mathjax (and inputfields) (note: these are nearly 100% of a student population) Android with chrome + mathjax (and inputfields) perform fine The only exception seems to be Mac&safari From a few recent session files: 28656 sessions 27612 from windows systems of which 20572 like gecko (divided by Trident and Chrome) 6627 firefox and no safari |
RE: headmathjax [ Reply ] By: Olivier Bado on 2016-10-19 07:51 | [forum:17697] |
It's not only what I think, but just about the facts : the problem does not comes from WIMS, as it is also appearing in the Mathjax live test. And as the Mathjax purpose is to bring MathML to all browser... I let you contact them, as your english is far better than mine... |
RE: headmathjax [ Reply ] By: Bernadette Perrin-Riou on 2016-10-19 07:47 | [forum:17696] |
As long as the problem safari/mathjax is not solved, I prefer that we stay with the old headmathjax in the distribution because it is easier to come back to safari/mathml. IE was disadvised since a long time (many others style trouble). But I will continue to test the new headmathjax. Bernadette |
RE: headmathjax [ Reply ] By: joke evers on 2016-10-19 07:41 | [forum:17695] |
So, do we agree that the "gecko engine" is the only native engine that will produce correct MathML ? And that all other browsers should use MathJaX ? (despite some problems with apple's safari...) |
RE: headmathjax [ Reply ] By: joke evers on 2016-10-18 16:00 | [forum:17694] |
If you think the bug is in mathjax, then an email to Davide Cervone & Peter Krautzberger could prove usefull |
RE: headmathjax [ Reply ] By: Olivier Bado on 2016-10-18 15:42 | [forum:17693] |
<<Would be interesting to see if the textarea-trick could work for safari ?>> As it was the previous behavior (before r.9976), yes the textarea trick still works (in fact, the problem comes form the self closing tag "<input/>". but it's only a trick, and it would be nice if mathjax solves the real problem. |
RE: headmathjax [ Reply ] By: joke evers on 2016-10-18 15:29 | [forum:17692] |
in short: the code snippet will give all browsers other than real Gecko engines the mathjax script...because Gecko is the only engine producing valid mathml This does nothing for the safari-mathjax bug. Would be interesting to see if the textarea-trick could work for safari ? |
RE: headmathjax [ Reply ] By: Bernadette Perrin-Riou on 2016-10-18 14:56 | [forum:17691] |
Yes, it is an optimization. Joke says that with the actual code, on Windows IE, mathjax is not active and should be. (other things did not work on IE, but she is right !). |
RE: headmathjax [ Reply ] By: Olivier Bado on 2016-10-18 14:41 | [forum:17690] |
Is it just an optimization of the code we have by now ? |
headmathjax [ Reply ] By: Bernadette Perrin-Riou on 2016-10-18 14:27 | [forum:17689] |
Joke proposes to replace in src/exec.c the function _headmathjax (it is the function that decides on the html page if mathjax will be used or not). The next script-snippet , copied from mathml-expert Fred Wang https://developer.mozilla.org/en-US/docs/Web/MathML/Authoring will give all non-gecko browers the mathjax script (so excluding all webkit based systems with poor mathml support) and of course this does not solve the problem of safari & mathjax Thanks for testing from any system and browser you have ! (I hope that no strange characters have been introduced in my copy-paste). void _headmathjax ( char *p) { _output_("\n<script type=\"text/javascript\">/*<![CDATA[*/\ function wims_mathml_zoom(id){\ var math = document.getElementById(id);\ if(math.getAttribute(\"mathsize\") == \"100%\"){\ math.setAttribute(\"mathsize\",\"200%\");}else{\ math.setAttribute(\"mathsize\",\"100%\");};\ };\ var ua = navigator.userAgent;\ var gecko = ua.indexOf(\"Gecko\") > -1 && ua.indexOf(\"KHTML\") === -1 && ua.indexOf(\"Trident\") === -1;\ if( ! gecko ){\ var script = document.createElement(\"script\");\ script.type = \"text/javascript\";\ script.src = \"scripts/js/mathjax/MathJax.js?config=MML_HTMLorMML-full.js\";\ document.body.appendChild(script);\ };/*]]>*/</script>\n"); } |