-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Multiple MathJax + Incomplete MathJax #1037
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
Comments
I'm not sure what the source of 1. is, perhaps conda used to separate MathJax as a package from IPython, but added it as a dependency. That would only affect the pre-Jupyter notebook (IPython < 4). Number 2. is a remnant of IPython < 4, when we didn't ship mathjax, due to its size, and the default was to use a CDN. If you wanted local mathjax, you could install it as an nbextension. This no longer has any effect as of notebook 4.0, because we bundle MathJax as a plain old dependency. The only relevant one if you are using current versions is 3, now that the notebook bundles a stripped MathJax as a normal dependency. |
That was informative and explains the situation somewhat, thanks. I should have mentioned that I upgraded Conda from v2 to v3, sorry about that. What remains is 2 things :
|
You would need to modify the notebook's build process to change what files are installed, then run Since we do the slimming at install time, instead of the above, you will have all of MathJax available if you do a development install:
which only links to the source dir, instead of copying the whitelisted files into site-packages.
Size. A complete MathJax install is many times larger than the entirety of the notebook and all other dependencies combined. A slimmed version without image fonts is still more than everything else combined. So we follow the recommended MathJax process for stripping the size of an install by only including the files/fonts we use at install time. We could add MathML as an additional bundled output format, since it is not especially large. |
Even though I copied the new files (
That would be great. Not all of us live and die by Google's mandates (re: chrome's removal of MathML).
Ok I understand the point about disproportionate size, but for context : the anaconda installer alone is 330MB. Any number of MathJax files of any size is not going to affect me in any way. And I think such users would form a significant chunk of Jupyter's userbase. I hope you guys can point me to the reason (github issue/commit) why IPython3/Jupyter moved to a bundled copy of MathJax from a package/nbextension... And would it be possible for me to redirect Jupyter to use a full, separately installed copy of MathJax? I am guessing that I could install a copy of MathJax, and then change some paths in Jupyter. |
If you have a full MathJax installed in nbextensions. That would be:
You can tell the notebook to use that one with: c.NotebookApp.mathjax_url = 'nbextensions/mathjax' As for the reasoning for bundling: we used to use MathJax from a CDN because the size of a mathjax dependency was completely unacceptable. That was suboptimal because it meant for most users, math wouldn't work without a network connection (e.g. on a plane). Only by using a stripped copy, following the MathJax documentation for reducing the size of a MathJax install, was it feasible to treat it like the rest of our js dependencies. |
That should be
Cf. b3f02b2 |
I am using Jupyter with IPython from Anaconda3 on Windows 7, notebook v4.1.0 which seems to contain MathJax 2.5.3 (I had to verify MD5 hashes manually, there is absolutely no mention of MathJax version anywhere).
I tried to switch the math renderer to NativeMML, but it could not find the required config.js. Adding the files directly from the MathJax release did not help (seems to be loading only those files listed in some config var, not the actual directories apparently).
The bigger issue is that I currently have 3 versions of MathJax on my system without having tried any repair of my own :
It appears that 3. is being used currently.
At this point I cannot figure out what is Anaconda's problem, and what is Jupyter's and what is MathJax's, so wanted to document it here first.
I'd be happy to help in fixing this issue (and others of this level), I love the concept of Jupyter. But I don't know what's going on.
The text was updated successfully, but these errors were encountered: