-
Notifications
You must be signed in to change notification settings - Fork 217
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
[blocked until mid 2023, maybe] Switch to supporting Mathjax v4 (instead of katex + mathjax v2, which is what we now use) #4734
Comments
There's a katex versus mathjax 2 versus mathjax 3 benchmarker here: https://www.intmath.com/cg5/katex-mathjax-comparison.php?processor=MathJax3 It seems to me that katex is about twice as fast as mathjax 3, and mathjax 3 is a bit over twice as fast as mathjax 2. |
On the backend for the share server we only use katex, so the only way to make this work would be probably to have to figure out how to use mathjax3 for the share server. I'm less optimistic about that. |
Regarding server side:
So yes, I think this is all totally plausible, and maybe not that hard! |
There's a list of things not ported to mathjax 3 For example:
Automatic line breaking is in Mathjax2 and Katex (since 2018), and this is a very critical blocker feature required by our users. So without this, there is absolutely no chance to use Mathjax 3 in CoCalc in any way, shape or form. There is a discussion ending here, in which line breaking is planned for "early 2020", then slips to "sometime in 2021", and concludes with a user saying: So I'm marking this issue "blocked"/"upstream", and changing the title to 2021 at least. |
Now it is definitely not going to get implemented until 2022 at the earliest: mathjax/MathJax#2312 (comment) |
Line breaking did not get implemented in 2022 in Mathjax v3, but it did get implemented in v4.alpha, so I guess we wait. I'm changing the title again. |
See comment here also: jupyterlab/jupyterlab#7218 (comment) |
Quote during JupyterLab meeting: "The size of the mathjax v3 package is 20MB, so we lazy load it dynamically." when discussing jupyterlab/jupyterlab#13877 So keep size in mind! |
I've decided to just support katex longterm. |
See math rendering using katex fallback to mathjax on error no longer works #4733 for why we can never ever switch to "only katex"
Right now we use out-of-date Mathjax 2 and katex together, with the motivation for both being entirely "synchronous rendering and speed".
If Mathjax 3 also provides "synchronous rendering and (sufficient) speed" and can run on the share server, we should switch to it, for simplicity and predictability (e.g., right now anything that relies on mathjax will just fail to render on the share server, which could seriously annoy and confuse users! Labeling this issue I-bug because this share server issue is a bug).
So:
The text was updated successfully, but these errors were encountered: