Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71745

mhchem expressions not rendered correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9.7, 3.10.4, 3.11, 4.0.5
    • Filters, Maths filters
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      Steps to reproduce:

      • Site with MathJax and TeX filters enabled. MathJax before TeX.
      • Chemistry notation enabled in MathJax:
        https://docs.moodle.org/en/Chemistry_notation_using_mhchem#via_MathJax
      • filter_mathjaxloader | mathjaxconfig:

        MathJax.Hub.Config({
            TeX: { extensions: ["AMSmath.js", "AMSsymbols.js", "mhchem.js", "noErrors.js", "noUndefined.js"] },
            config: ["Accessible.js", "Safe.js"],
            errorSettings: { message: ["!"] },
            skipStartupTypeset: true,
            messageStyle: "none"
        });
        

      • In Moodle-course create a page and add mhchem-expressions.

      We have found most mhchem-expressions rendering correctly.
      For example:

      \(\ce{ \bond{->} }\)
      \(\ce{ -> }\)
      

      The following expressions are broken though:

      \(\ce{ \bond{<-} }\)
      \(\ce{ <- }\)
      \(\ce{ <-> }\)
      \(\ce{ <=> }\)
      \(\ce{ <=>> }\)
      \(\ce{ <<=> }\)
      \(\ce{ CO2 + C <- 2CO }\)
      \(\ce{ CO2 + C <=> 2CO }\)
      \(\ce{ H+ + OH- <=>> H2O }\)
      

      Rendering problems seem to occur only in \ce -expressions starting with "<".

      We have found that this is a regression caused by MDL-69911.
      With TeX-filter disabled or the parameter cleaning introduced by MDL-69911 commented out, the mhchem expressions are rendered correctly.

            Unassigned Unassigned
            schach Heiko Schach
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.