MathJax problems with mix of TeX and MathML

MathJax problems with mix of TeX and MathML

by Frank Uy -
Number of replies: 3
My site (Moodle 3.5) has several courses with TeX content, a few with MathML, and one with some of each.

MathJax filter works for the TeX, but not for the MathML, with several different configs tried. Currently we're using the default config.

If we load a second copy of MathJax.js via "Additional HTML", both math formats work most of the time, but some users have intermittent glitches where the TeX displays incorrectly.

Suggestions? I was thinking maybe different MathJax configs for different courses might fix it, but how to do that?
Average of ratings: -
In reply to Frank Uy

Re: MathJax problems with mix of TeX and MathML

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Frank,

"...maybe different MathJax configs for different courses..." - Go to the course you want to configure and click on the Editing Cog at the upper right, then click on Filters. Enable/disable the math filters you ant to use.

If you so desire, you can actually edit the Filter settings for individual activities, which is what I generally do. That way I can use whatever math filter I need to for each activity to achieve the best render, especially when trying to "draw" things.

Average of ratings: Useful (1)
In reply to AL Rachels

Re: MathJax problems with mix of TeX and MathML

by Frank Uy -

Thanks Al. Are you saying to install another secondary math filter? Which one?

The problem I see is that there's just a single toggle for "enable MathJax / disable MathJax", when I'd like "enable MathJax setting A / enable MathJax setting B".

In reply to Frank Uy

Re: MathJax problems with mix of TeX and MathML

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Frank,

Sorry, I was not more clear. At Site administration > Plugins > Filters > Manage filters, I have filters for Mathjax, and Algebra notation set to Active On, for Content and headings. I have Tex notation set to Off but available, for Content and headings.

Anytime I have a situation like you describe where the renders seem to have "intermittent glitches" I go to the actual activity and specifically tell it which filter to use.

Since I have some extra Tex packages set up, this makes it possible to mostly use Matjax, for the "better" renders, but if I want to use something from the extra packages I have for Tex, then I can specifically tell Moodle which filter to use for it.

Average of ratings: Useful (1)