Search code examples
htmlmathjax

Mathjax templates dont work on local computer


I have started to use Mathjax to develop a desktop app. I have found a very nice collection of examples and templates at: https://www.tuhh.de/MathJax/test/examples.html

However, whenever I download the HTML code of these files (with Ctrl+U) and copy it into a Notepad++ file (with .html suffix), they don't work on any local computer i have tried so far.


Solution

  • Just replace the relative path :

    <script type="text/javascript" src="../MathJax.js?config=MML_HTMLorMML-full"></script>
    

    to

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=MML_HTMLorMML-full"></script>
    

    (see here to choose a cdn : http://docs.mathjax.org/en/latest/start.html)

    or download the js files to embed them localy.