I am testing the MathJax javascript library in a local HTML file. It works and correctly renders math formulas if I include:
script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
in the HTML file, but it doesn't work if I include instead:
script type="text/javascript" src="/path_to/mathjax.js"
or even if I put the entire javascript source code.
What is the reason? I need to load mathjax.js from local js file into a local HTML file, so the first way doesn't help me.
(EDIT- I see an error: failed to load /extensions/MathZoom.js
)
MathJax fails to load if the site is being viewed through HTTPS, which it is if HTTPS Everywhere. Disable HTTPS Everywhere for just this site, and then reload the page without HTTPS.
MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.
Obtaining MathJax via an archive Release versions of MathJax are available in archive files from the MathJax GitHub page. The current version is available via the “clone or download” button, or you can use the “releases” tab to download an archive for an older version.
This may occur due to two reasons
1.You may have not extracted the entire zip folder, so first do that.
Still you are getting the error look into second reason.
2.You are not referring to the file correctly. eg:
<script type ="text/javascript" src="pathto\mathjax.js">
You have typed an incorrect filename. Correct name of file is MathJax.js.Given below is the correct way.
<script type ="text/javascript" src="pathto\MathJax.js">
MathJax.js is the name of the file in the extracted folder(unless modified)
If all of this is not working,then link to the script in this way:
<script type="text/javascript" src="Pathto\MathJax.js?config=TeX-AMS-MML_HTMLorMML">
The reason that your script is not working is you are not including:
'?config=TeX-AMS-MML_HTMLorMML'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With