# Mathjaxloader filter breaks nested Latex math environments

XMLWordPrintable

#### Details

• Type: Bug
• Status: Closed
• Priority: Minor
• Resolution: Fixed
• Affects Version/s: 3.4, 3.5, 3.6
• Fix Version/s:
• Component/s:
• Labels:
• Testing Instructions:
Hide

Moodle filters are used in most places in which users may add formatted text, for example, in the course section summary.

### Initial setup

1. The MathJax filter must be active in the site with the default settings (Site administration -> Plugins -> Filters)

### Testing

1. Start editing a course section summary
2. We will try different kinds of math inputs and check that they are rendered correctly in the course page. The Moodle HTML editor should be switched to the HTML mode so that you can copy-paste the examples directly into the editor. (The HTML </> button shows in the editor toolbar when the second row of tools is also shown.) For each case, save the changes and check that the course page looks correct.
1.  Inline $$x_2 = y$$ and display $h = t^2$ 

Ensure that one inline and one display formula are rendered.

2.  Display $$h = t^2$$ and inline $$x_2 = y$$ 

Ensure that one display and one inline formula are rendered.


Ensure that one inline formula is rendered and the letter F is inside a box. The display formula leaves some visible vertical whitespace on the screen.


Ensure that one inline formula is rendered and the letter F is inside a box. The first display formula leaves some visible vertical whitespace on the screen. Ensure that the second display formula (at the end of the text) renders "b equals F-box".


Ensure that the formulas are rendered correctly: one basic inline, empty display formula (whitespace), inline a equals F-box, display b equals F-box, simple inline, and display c equals Fp-box.

Show
• Affected Branches:
MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
• Fixed Branches:
MOODLE_34_STABLE, MOODLE_35_STABLE
• Pull from Repository:
• Pull 3.5 Branch:
MDL-61981-35_nestedmath
• Pull Master Branch:
MDL-61981-master_nestedmath
• Pull Master Diff URL:

#### Description


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

#### Attachments

1. MMDL-61981.PNG
24 kB

#### People

• Assignee:
Markku Riekkinen
Reporter:
Markku Riekkinen
Peer reviewer:
Luca Bösch
Integrator:
Eloy Lafuente (stronk7)
Tester:
Participants:
Component watchers:
Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
0 Vote for this issue
Watchers:
4 Start watching this issue

#### Dates

• Created:
Updated:
Resolved:
Fix Release Date:
12/Nov/18

#### Time Tracking

Estimated:
0m
Remaining:
0m
Logged:
30m