Open abdurahmanus opened 6 years ago
I'm using webpack, so actually I'm more interested in importing MathJax script from node_modules for example. Is it possible?
Have you found any solution?
Simply pass your local url as source:
<MathJax.Context
input="tex"
script="/MathJax/MathJax.js"
>
Ok I'll try this and will let you know.
Currently I'm using old way of using Mathjax. I compile code and attach Mathjax with index.html
Any updates of how this worked out? In testing this locally, I'm currently receiving a
MathJax.js:19 GET http://localhost:8080/MathJax-2.7.5/extensions/MathZoom.js?V=2.7.5 net::ERR_ABORTED 404 (Not Found)
with the same error for the MathMenu
extension when trying this option. I've also tried putting the MathZoom.js
and MathMenu.js
files under the same extensions/xxx
path, as well as unzipping and importing the entire MathJax project into my project (with the hopes of extracting what is absolutely necessary later) to no avail.
Any example projects/code of doing this would be greatly appreciated 👍
@ByronBecker I ran into that problem before. Simply add
<script type="text/x-mathjax-config">
MathJax.Ajax.config.path["extensions"] = "../somePathToYourMathJax/MathJax";
</script>
inside your index.html under public folder.
Then, inside mathjax.config, you can import extensions using ["extensions"]/XXX.js. Or in this case, you can do someting like ["extensions"]/MathJax.js
Inside any extensions, make sure you have MathJax.Ajax.loadComplete("[Extra]/XXX.js");
Hello, is it possible to use local matjax script? from file system, without network request?