-
Notifications
You must be signed in to change notification settings - Fork 460
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
Replace MathJax with KaTeX #1669
Conversation
What happened to the |
Now that is what happens when you use jinjify wrong |
now please fix the Also, you can now just type |
done. This works for delimited math like using |
We might need some special config for the auto-render plugin. |
Now it works for math role but not for math directive for reasons I don't know. |
Your hacky patch is unnecessary. All we need to do is change the delimiters for auto-render. (also, you forgot the CSS) For example:
We should make those configurable via the config file, because some weird people really want dollars (deprecated and error-prone) as delimiters. We also need I’ll work on this. |
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
This should be quite functional now, and KaTeX is now fully bundled — an empty site grew from 2.5 MB to 3.8 MB) We still have a few references we might want to change. We might also want to restore cc @damianavila — do you know of any problems, other than having to upgrade all custom themes? |
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Not sure, I did not play with katex before, the notebook uses Mathjax so maybe there is some degree of incompatibility... if there is a possibility, I would leave the mathjax support, at least, as an option... |
Please don't make KaTeX the default. It has limited math support compared to mathjax (see KaTeX/KaTeX#43). |
This won't happen because of KaTeX limitations. |
It would be great to add KaTeX support, but make it an option alongside MathJax, and do it in a way that doesn't change existing sites unless you explicitly add something to conf.py (I don't personally care about the defaults for new sites). |
It’s not easy to juggle two different systems. You can always add KaTeX to your own site via BODY_END and not using the |
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
It's worth to note that limitations in KaTeX are slowly vanishing. For instance v0.4.0 (released over a month ago):
and v0.5.0 (released a week ago):
One day it may become good enough for becoming a default engine for math input in Nikola. |
When that happens (and someone tells us about it!), we’ll happily include it. We are not qualified to tell it’s good or not… |
Also, feature list: https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX |
Not for merging, of course, but hey, let's play with it.