Cannot Display jsMath in MathOverflow Forum

  • TheBridge

    TheBridge - 2010-07-06


    I have downloaded the jsMath Fonts but cannot get the Latex dispalyed correctly on the forum Mathoverflow

    Here are the details of the error of the Web page I get

    >Agent utilisateur : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    >Horodateur : Tue, 6 Jul 2010 10:16:15 UTC

    >Message : Erreur d'exécution inconnue (translation : Unknown Execution Error)
    >Ligne : 6
    >Caractère : 4
    >Code : 0
    >URI :

    The thing is that I don't know if it is a browser (I use IE 8) parameter setting problem or if it is something else ?

    Any help would be appreciated


  • Davide P. Cervone

    This is an error in the mathoverflow footer.js file, not an error with jsMath, so you should probably report it to them.  The issue is that their loadScript code creates a script tag and uses innerHTML to set the content of that tag.  IE8 (and 7 and 6, I believe) throw an error when you do that; you need to use the text property rather than innerHTML to set the content of a script tag. 

    Their entire approach to loading jsMath is a bit fragile.  It would be best if they loaded jsMath/easy/load.js and used that to configure jsMath rather than loading all the components by hand (which has potential synchronization problems), and calling the jsMath setup routines by hand.


  • TheBridge

    TheBridge - 2010-07-06

    Ok  Davide

    thx for the quick answer I'll report this bug the the forum

  • Anonymous - 2010-07-07

    Thanks for the correction, Davide. I've updated the MathOverflow footer to use the text property instead of innerHTML.

    When we first set up jsMath on MO, we tried using the easy loader, but we were never able to make it work. I wish I could say more, but it's hard to remember debugging something 8 months ago. If I have some time in the near future, I'll see if I can reproduce the problem.

  • Davide P. Cervone


    FYI, I seem to recall that Opera doesn't handle script.text and requires script.innerHTML, and if memory serves, Safari 2 allows you to set script.text, but it doesn't do anything (again, innerHTML works).  So the solution may not be quite as simple as you would like.  I have used

    try {script.innerHTML = text} catch(err) {script.text = text}

    with some success.

    Well, I'm curious what the easy/load.js problems were, but don't worry if you can't recall them.  I've been concentrating on MathJax, as you are probably aware, and I think it has a better approach to configuration than jsMath's. 



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks