Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using local matjax script #5

Open
abdurahmanus opened this issue May 24, 2018 · 6 comments
Open

Using local matjax script #5

abdurahmanus opened this issue May 24, 2018 · 6 comments

Comments

@abdurahmanus
Copy link

Hello, is it possible to use local matjax script? from file system, without network request?

@abdurahmanus
Copy link
Author

I'm using webpack, so actually I'm more interested in importing MathJax script from node_modules for example. Is it possible?

@toadeelali
Copy link

Have you found any solution?

@DavidSichau
Copy link

Simply pass your local url as source:

  <MathJax.Context
          input="tex"
          script="/MathJax/MathJax.js"
>

@toadeelali
Copy link

toadeelali commented Nov 19, 2018

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

@ByronBecker
Copy link

ByronBecker commented Aug 14, 2019

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 👍

@wooloba
Copy link

wooloba commented Sep 12, 2019

@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");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants