display-mode formulas using MathJax

display-mode formulas using MathJax

by Beni Keller -
Number of replies: 3

Hey all,

According to this info in the documentation

https://docs.moodle.org/33/en/Using_TeX_Notation#Equation_displayed_on_its_own_line

I should be able to insert inline and display-mode formulas in Moodle, using the usual delimiters as you would in LaTeX. That's also what I'm used to from using MathJax on other sites.

I tried this on our Moodle instance in a text label I added to a course. No matter what I use as delimiters, the formula always appears as an inline formula. The MathJax settings are still the unchanged defaults and the filter is activated.

I included a screenshot of the editor and the resulting label in the course.

I'm on Moodle 3.2.4.

Any idea what I'm doing wrong?

Thanks

Beni

Attachment course.png
Attachment editor.png
Average of ratings: -
In reply to Beni Keller

Re: display-mode formulas using MathJax

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

Hi Beni,

I suspect you have TeX filter compatibility turned on. Go to your Site administration > Plugins > Filters > Mathjax. Remove the checkmark for TeX filter compatibility if there is one, then Save changes. That should fix your problem.

In reply to AL Rachels

Re: display-mode formulas using MathJax

by Beni Keller -

Hey Al,

Thank you for your reply. I checked the settings. They are still at the default which means the Tex filter compatibility is already turned off.  Is there another way to turn this compatibility mode on?

B

In reply to Beni Keller

Re: display-mode formulas using MathJax

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

Hi Beni,

Sorry, don't know of any other way "...to turn the this compatibility mode on?" The only other thing I can think of to check is, do you have any, Additional equation delimiters, set? Mine is empty.

Not sure if it would make a difference, but what do you have in the box for MathJax URL and in the box for MathJax configuration.

On Moodle 3.2.5+ My MathJax URL is - https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js

And my Mathjax configuration is:

MathJax.Hub.Config({
    config: ["MMLorHTML.js", "Safe.js"],
    jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
    extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
    TeX: {
        extensions: ["xypic.js","mhchem.js","color.js","AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"],
    },
    menuSettings: {
        zoom: "Double-Click",
        mpContext: true,
        mpMouse: true
    },
    errorSettings: { message: ["!"] },
    skipStartupTypeset: true,
    messageStyle: "none"
});

The same settings in my Moodle 3.3.2+ displays the equations as expected.

Since I did not mention it before, just want to make sure that you know, your examples DO work correctly for me.