-
Notifications
You must be signed in to change notification settings - Fork 111
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
Use locally installed MathJax package when available #675
Comments
Allowing to use a local MathJax copy via distro packages is a nice idea and I'm happy to review a PR for this. Some things to keep in mind while working on this issue:
|
I did some initial research into that. Here's what I found in some common distros:
So, looks like there's a problem. Many distros still ship Mathjax 2.x. Perhaps it has something equivalent to In that case I think if would be best if it was possible to just specify the location of |
Thanks for doing the research! Your proposed solution could work, but I have my doubt that it will be used by lots of people and it has the drawback that we need to test two different MathJax modes: online and offline. Maybe we should think about bundling it again. How much space would a bundled MathJax need? How about the competitor KaTex? Are they both equally easy to bundle? Also, which of them can be fully embedded into journals exported as HTML? |
Yeah, you're probably right on that. I think Arch might adopt it for the official package if asked to but other distros would very likely ignore it or be at least reluctant. Not even saying anything about other platforms.
On my system the whole
If not at setup time then I think this would be my preferred solution. But just wanted to note that you could also cache in user's home dir after the first download. It would be worse for me because rednotebook would still have to hit the servers at least once but IMO better than nothing.
I don't know the answers right away but, if that seems like a better solution to you, I could check when I have a bit of time. |
It's probably wise to do this small research before deciding on a solution, yes. Of course this is not urgent. |
I recently noticed that on my machine rednotebook tries to connect to cdn.jsdelivr.net every time it starts. Apparently to download mathjax.
This seems wasteful and will make math rendering impossible without an Internet connection in an application that otherwise is perfectly usable offline. Some distributions, like Arch Linux ship a mathjax package in their official repositories. Would it be possible to make rednotebook use that when available and only if not fall back to downloading it? Even better would be a
setup.py
flag to make rednotebook always use a local installation at a given path and never download anything.I found this #264 (comment), which says that the reason for not using a local copy was a concern about the package size. It seems that relying on distros to provide it would be a perfect solution here.
The text was updated successfully, but these errors were encountered: