MathJax rendering issues

52 views
Skip to first unread message

mal.m...@gmail.com

unread,
Jun 1, 2012, 3:50:11 PM6/1/12
to mathja...@googlegroups.com
I forward this from a user of my Wikipedia MathJax script. I'm at loss what is going wrong but maybe Davide or someone else has any clue.

I invoke MathJax via some wrapper script. Among other stuff, it checks for the presence of TeX code in the page, and if found dynamically adds the x-mathjax-config script and the script element that invokes the main MathJax.js to the DOM. This has been working fine for me as well as other users. However, one user now reports that for him the math rendering works only on regular pages, but doesn't work on the preview of pages that are _edited_. The user can verify that the x-mathjax-config code gets called from MathJax.js, but not even the input jax seems to be loaded as all the TeX code stays black. Calling MathJax.Hub.Reprocess(); or similar does not have any effect. I'm absolutely at loss what the reason for this could be.

Any insight appreciated. Thanks,
-nageh

Davide P. Cervone

unread,
Jun 8, 2012, 5:59:51 PM6/8/12
to mathja...@googlegroups.com
If the user is an IE user, that may be the problem.  There is a timing issue on some pages where IE tells MathJax that the page is ready before it actually is, and so MathJax runs before the math is actually loaded into the page.  One solution is to add

if (MathJax.Hub.Browser.isMSIE) {
  window.onload = function () {MathJax.Hub.Queue(["Typeset",MathJax.Hub])}
}

to your x-mathjax-config script and this should take care of the problem for IE users.

If it's not an IE user, then can you give more details about the situation?

Davide
Reply all
Reply to author
Forward
0 new messages