Skip to content

Mathjax v2.5

pkra edited this page Jan 2, 2015 · 11 revisions

This release focuses on speed improvements.

Draft for what's new page

Improve HTML-CSS speed

Goal: get HTML-CSS to SVG speed

  • Eliminate some measurements that modern browsers don't need anymore
  • eliminate lots of measurements for simple output
  • see this branch and config option

two pass rendering mode

Goal: enable a first, faster but less precise pass, followed by a second, precise pass.

  • develop “simple” HTML-output (faster but potentially lower quality)
    • focused on speed
    • stable across browsers.
    • development in this branch
  • incorporate two-pass mode

Leftovers

  • ship the new ContentMML extension
  • ship improved Elementary Math extension.

Help for testing the new output mechanisms

no-reflows

Download a copy of our development branch from https://github.com/MathJax/MathJax/tree/develop

Use unpacked/MathJax.js.

Done.

For the record, the new configuration option is called noReflows and active by default. But for the record, this is how to switch it off

    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        "HTML-CSS": {noReflows: false}
      });
    </script>

two-pass mode

Download a copy of the CommonHTML branch https://github.com/dpvc/MathJax/tree/common-html/ (not yet merged into develop).

Use unpacked/MathJax.js

Configure the output to include the CHTML-preview extension for the HTML-output

  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      \\ ...
      extensions: ["CHTML-preview.js"],
      \\ ...
    });
  </script>

before MathJax.js is loaded.

Note the CHTML-preview extension sets up a CommonHTML pass followed by a pass of HTML-CSS or SVG (depending on how you've configured MathJax).

Just the new CommonHTML output (i.e., the first pass above)

Download a copy of the CommonHTML branch https://github.com/dpvc/MathJax/tree/common-html/

Use unpacked/MathJax.js

Configure the output to CommmonHTML (instead of HTML-CSS), e.g.,

  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      jax: ["input/TeX","input/MathML","output/CommonHTML"],
      extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
      tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true },
      TeX: {
        extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
      }
    });
  </script>

before MathJax.js is loaded.

Clone this wiki locally