-
Notifications
You must be signed in to change notification settings - Fork 463
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
(WIP) LateX rendering #696
base: master
Are you sure you want to change the base?
Conversation
With the current code, MathJax runs but does not render anything. import bqplot.pyplot as plt
plt.figure(title='L$\\alpha$tex')
plt.show() outputs 'Ltex'. Here is what the html looks like: However, it does render correctly if I wrap the svg text in a foreignElement (commented JS code in the PR). That is something we might want to avoid though because it would mean manually rendering axis ticks rather than using d3's inbuilt ones. @jasongrout any ideas on this? |
Is this in classic notebook, jupyterlab, or on a web page? |
I'm not sure what is going on at first glance. If I understand correctly, you have the mathjax getting rendered into the svg (i.e., mathjax is creating nodes inside the svg), but it isn't showing up on the page? |
Yes that's right. The issue is the same in both notebook and lab. |
So the problem is that SVG refuses to render anything that is not an SVG element, unless it is inside a foreignObject. Unless the notebook MathJax configuration is changed, it seems we have 2 choices:
Thoughts? |
I thought of https://khan.github.io/KaTeX/ but it does not have svg output |
MathJax 3 (in beta) is also way more flexible in these regards. However, we probably shouldn't be in the business of providing a mathjax implementation? |
@jasongrout any idea on how beta is beta, and what their timeline is? |
Yes. To me that makes sense (if possible). |
@dpvc is one of the most careful individuals I've ever met (that's a good thing!). I don't know the precise timeline for mathjax 3, but there has been steady progress, and given past experience, I am confident that whatever is implemented/published is pretty high quality. |
Hi there! I was wondering what the current status of this WIP is? |
Just checking to see if any movement is possible on this feature request (has the state of MathJax support for SVG changed)? |
This aims to enable LateX rendering to titles, legends, ticks and labels (#678).