Skip to content

MathJax 4 warning and TeX conversion failure #2943

@NSoiffer

Description

@NSoiffer

Issue Summary

In trying out v4, I get a warning "MathJax: Invalid option "enableAssisitiveMml" (no default value)."

I have

    MathJax = {
      loader: {load: ['input/tex', 'input/asciimath']},
      options: {
        enableMenu: false, // interferes with navigation
        enableAssistiveMml: true,
      }
    };

I didn't see anything in https://github.com/mathjax/MathJax-src/releases/tag/4.0.0-alpha.1 about a change regarding that option. The application doesn't run.

After fixing the above by commenting out the line, the application (see #2937) doesn't run. The error in the console is:

(index):30 MathJax conversion error:  Error: MathJax retry
    at t.retryAfter (tex-mml-chtml.js:1:768405)
    at a.enrich (tex-mml-chtml.js:1:43964)
    at Object.renderMath (tex-mml-chtml.js:1:82401)
    at t.renderConvert (tex-mml-chtml.js:1:83214)
    at e.convert (tex-mml-chtml.js:1:92292)
    at e.convert (tex-mml-chtml.js:1:86327)
    at t.MathJax.<computed> [as tex2mml] (tex-mml-chtml.js:1:70018)
    at ConvertToMathML ((index):25:28)
    at imports.wbg.__wbg_ConvertToMathML_1ba3a1bdd5856d88 (index-efa97dbedd7f5bfc.js:317:21)
    at <math_cat_demo::Model as yew::html::component::Component>::update::h0af6f1cc7b48c509 (index-efa97dbedd7f5bfc_bg.wasm:0x556ff)

The input is x = {-b \pm \sqrt{b^2-4ac} \over 2a} and the JS being run is

    function ConvertToMathML(math_str, math_format) {
      MathJax.startup.defaultReady();
      let options = {display: true};
      let mathml;
      try {
        if (math_format == 'ASCIIMath') {
          mathml = MathJax.asciimath2mml(math_str, options);
        } else if (math_format == 'TeX') {
          mathml = MathJax.tex2mml(math_str, options);
        } else {  // should be "MathML"
          mathml = MathJax.mathml2mml(math_str, options);
        };
      } catch (e) {
        console.error("MathJax conversion error: ", e);
        mathml = "<math><merror>MathJax conversion error</merror></math>"
      }
      console.log("ConvertToMathML:\n" + mathml.toString());
      return mathml;
    }

Environment

This is on Windows 10.
In Firefox, I only see the warning. In Chrome, I get the above error:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions