
Type: Bug

Status: Closed

Priority: Minor

Resolution: Fixed

Affects Version/s: 3.4, 3.5, 3.6

Component/s: Maths filters
Normally in Latex and MathJax, it is possible to use nested math environments, i.e., \( inside a \[ block. The Moodle filter mathjaxloader breaks that usecase by adding <span class="nolink"> elements around the inner math environment, which is not allowed since it is still inside the outer math environment and HTML markup does not work there.
Example: write text in a Moodle course section
Testing math.


\[

\newcommand{\False}{\mathsf{F}}

\newcommand{\NullF}{\fbox{\(\False\)}}

\]


Writing some content with math. Inline formula \( a = \NullF \)

The Latex macro definitions are broken since Moodle adds span HTML elements inside it.