Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #2943
Closed
Open
Issue created Oct 02, 2022 by Administrator@rootContributor

MathJax 4 warning and TeX conversion failure

Created by: 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:

Assignee
Assign to
Time tracking