-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Add a KaTeX and MathJax based LaTeX pane #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Much better than my matplotlib-based hack. I'm happy for it to replace the LaTeX pane unless there are cases where the image-based approach is more general.
katex.min.js + katex.min.css are ~137 KB combined. Is it worth it to always bundle that or should I require the user to run |
I'd say it's worth saving the 137KB at a cost of having to load the extension explicitly |
Okay, I've now implemented MathJax as well and refactored in such a way that the LaTeX pane will use either the MathJax or the KaTeX model depending on which was loaded. If an explicit renderer is defined on the pane it will use that and if neither is loaded it will warn. |
Codecov Report
@@ Coverage Diff @@
## master #311 +/- ##
==========================================
+ Coverage 89.28% 89.29% +<.01%
==========================================
Files 65 67 +2
Lines 6617 6622 +5
==========================================
+ Hits 5908 5913 +5
Misses 709 709
Continue to review full report at Codecov.
|
I think this should probably replace the LaTeX pane because it is much more capable. That said I still need to assess how expensive it would be to load KaTeX all the time, if it's too large I will likely have to let the user request it explicitly using
pn.extension('katex')
(not required on bokeh server or when saving).