Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 968 Bytes

speech-explorer-tex.html.md

File metadata and controls

27 lines (22 loc) · 968 Bytes

This example shows how to enable MathJax's accessibility extension to attach speech to typeset math and enable interactive exploration of expressions.

The key lines are

  <script>
  MathJax = {
    loader: {load: ['a11y/sre']},
    options: {
      menuOptions: {
        settings: {
          explorer: true,
          assistiveMml: false
        }
      }
    },
    tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
  };
  </script>
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>

which causes the a11y/sre extension to be loaded, and modifies the menu settings to initialise the interactive explorer on page load. In addition we can switch off the assistive mml extension as it is no longer needed.

Run the example