Dear Davide
I am testing v1.9beta+ with jsmath (v3.4e). I found two problems:
1. The bottom right shows jsMath control panel and bottom right shows Loading jsMath ... but nothing is happening to the equations. I was using \[...\] tags
2. Recently I bought moodle theme 'envy' from NewSchool Learning. When this theme is selected, the jsmath filter does not even load.
Can you please suggest me a solution
venkatesan
jsmath not working in v1.9 beta+
Number of replies: 2Re: jsmath not working in v1.9 beta+
For question 1, this suggests that there may be an installation problem with jsMath. Can you check your web server's error log to see if there are requests for jsMath.js that are not being served? If so, the URL that is failing may give you a clue about what is going wrong (e.g., looking in the wrong directory).
If that doesn't help, I will take a look at it if you would give me guest access to your site. (You can send the URL and access information via email or Moodle's message system if you prefer.)
For 2, it looks like the "envy" theme uses the window.onload event handler, which is also used by jsMath. One possible solution is to edit the moodle/theme/envy/styleswitcher.js file and replace the window.onload function (near the bottom) with
var old_onload = window.onload; window.onload = function(e) { var cookie = readCookie("style"); var title = cookie ? cookie : getPreferredStyleSheet(); setActiveStyleSheet(title); if (old_onload) {old_onload(e)} }This will save the old onload handler (jsMath's one) and has the new onload handler call the old one after it's done. That should cause jsMath to run.
(Note that I'm not able to check this, since I don't have the envy theme, or version 1.9 of Moodle, so it may take a little adjustment, but it's the right idea.)
Davide