Skip to content

Mathjax v2.5

pkra edited this page Sep 16, 2014 · 11 revisions

This release focuses on speed improvements.

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

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.

Activate the new configuration option noReflows, e.g.,

    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
        extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
        tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true },
        "HTML-CSS": {noReflows: true}, // the important part
        TeX: {
          extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
        }
      });
    </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 CommmonHTML (instead of HTML-CSS), e.g.,

  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      jax: ["input/TeX","input/MathML","output/HTML-CSS"],
    extensions: ["CHTML-preview.js","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.

Note the CHTML-preview extension which sets up a CommonHTML pass followed by a HTML-CSS pass.

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