-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 11.5.4
-
Component/s: None
-
Labels:None
The way OLAT currently loads MathJax produces some problems (especially with 2.7.2). The attached Patch solves these issues for us:
- The MathJax library is loaded with a jquery ajax call which does create a script tag as long as the url is on another domain, if it is on the same domain it will use an ajax call and MathJax can't find out its root directory as this depends on the script tag. (In the patch we set the crossDomain parameter of the ajax call to yes, so it always creates a script tag)
- The inline configuration of the MathJax library is done in the success callback of the ajax call. This does not seem to work with 2.7.2 (and sould not be done this way since 2.7 according to the docs). In the patch we did instead use the method described in: http://docs.mathjax.org/en/latest/configuration.html#using-plain-javascript
- We do have user supplied content in our database that is not valid mathml code, but is rendered with firefox just fine, as soon as mathjax tries to rerender it it will fail and produce error messages. We plan to get rid of that content, but in the meantime we switched the mathjax configuration to not process mathml content. In the attached patch it is now possible to change the hard coded mathjax configuration in the olat.local.properties (the current default being set in olat.properties).