-
Notifications
You must be signed in to change notification settings - Fork 16
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
Issue with Fonts and Local MathJax Files #1
Comments
Hi there! Thanks for opening the first issue 🎉 🎈 and for using this library! Now, regarding your issue, MathJax needs a bunch of assets other than the main file that is downloaded initially and this is just how it is, no matter if you host it yourself or if you use a cdn. You can see in the development tools even if you use a cdn that other assets, such as fonts, are downloaded as well. Nonetheless this is simple to do locally too so no worries. MathJax fetches one file initially which then references other assets within the source code so if you follow the instructions below but still have problems, you might wanna look into your folder structure and make sure that relative references from the initial MathJax file works as they should.
Remember that MathJax 2 takes up much more space than MathJax 3 so it might be a good idea to use MathJax 3 when hosting your local copy. I've verified this setup locally and it works for both MathJax 2 and 3 but let me know if you need a sandbox as inspiration :) |
@fast-reflexes @Cobular We recently started using this library and came across the same problem. We found another solution that let us install mathjax through If you use webpack and have your
Our provider looks like this:
|
Looks good! :) 👍 Thanks for contributing! |
How can I achieve something like this, but for Vite? |
I would still recommend storing the MathJax files in your public folder and then access them via the |
Thanks @fast-reflexes for the recommendation.
|
Great! haha. this was just also mentioned in another ticket: #44 (comment) :) What a coincidence :) |
Hey!
So I'm trying to use this in an extension, and that requires there to be no requests to outside scripts that are executed, meaning I can't rely on a CDN for mathjax. I'm trying to use the
src
prop on theMathJaxContext
component to make this work. MathJax itself works, however I can't get the required fonts to load. It expects fonts to be atoutput/chtml/fonts/woff-v2/
, and technically I could put them there, but I'd really prefer not to and for there to be some better approach. Any ideas?My
MathJaxContent
:Thanks a bunch for making this, it's been quite useful for me!
The text was updated successfully, but these errors were encountered: