I am trying to include mathjax 1.1 in a moodle 2 installation. I have had some success by including the following javascript code in my theme. (Tested on firefox 3.6.)
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
script.type= 'text/x-mathjax-config';
script.text = " MathJax.Hub.Config({tex2jax: {inlineMath: [ ['$','$'] ],processEscapes: true}});";
head.appendChild(script);
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
head.appendChild(script);
It does not work when content is included via ajax calls. That doesn't seem to be a major problem for me but still I want to ask if anyone has been able to deal with this problem.
Also, I want to make a new theme which is basically the theme of my university with the addition of this javascript file. I was hoping to use the $THEME->parents but it doesn't really work, for example pictures from the university theme do not show up in the new theme. Is the only option to copy the university theme or what?
Thanks for the good work on moodle+mathematics.
Stefán