2021-06-16

MathJax version 2 hosted on my server domain

MathJax the JavaScript engine that can display math notation in a webpage, is generally included from a CDN. This URL https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js, for instance, provides a convenient endpoint for websites where displaying mathematical formulas is important.

However, creating your own MathJax instance is trivial if you already own a webserver (or a PAAS account). Clone the main repository from https://github.com/mathjax/MathJax, checkout the legacy-v2 branch, and then serve the base folder as static folder, that's it.

If you prefer to use my server instead of the default CDN, MathJax is available at the following URL:

   https://tessarinseve.pythonanywhere.com/MathJax/MathJax.js

A simple configuration script, that seems to generally work well, can be copy/paste from the snippet below.

    <script async src="https://tessarinseve.pythonanywhere.com/MathJax/MathJax.js?config=TeX-AMS_HTML-full"></script>
    <!--MathJax-->
    <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
    tex2jax: {
      inlineMath:[ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true         
    }
    });
    </script>
    

The same URL is also used by this website to generate the HTML version of Jupyter Notebooks.