-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Latex in figure is not rendered in sphinx documentation #3152
Comments
There's not much we can do on the Plotly side unfortunately... MathJax must be loaded for LaTeX to render in a figure. Maybe there's a sphinx flag to force it to load, or a way to hide that cell or something? |
Thanks for answering! I will try finding a workaround. Also, the nbsphinx guys are working on force loading MathJax, so maybe that will fix this. |
Can you please check if spatialaudio/nbsphinx#551 fixes this? |
@nicolaskruchten Could you please check if spatialaudio/nbsphinx#572 is something that you can help with? if (window.MathJax) {MathJax.Hub.Config({SVG: {font: "STIX-Web"}});} in the HTML page which is causing an error as |
Hmmm are you using MathJax 3.x ? Plotly.js is only tested/developed against MathJax 2.x at the moment so that might be the problem right there. |
Oh, I see. |
Hello, thanks for making this awesome library!
I am trying to embed a plotly figure in sphinx documentation by plotting inside Jupyter Notebook, but Latex in the axes in the plotly figure is not rendered, and all I see is code that was supposed to generate the Latex-based axes title.
Something like this:
As mentioned here, MathJax is not loaded until a math object is detected in the sphinx documentation. So I tried adding a cell with latex in it and the axes titles are rendered properly.
However, I think this doesn't look appealing, and wondered if there is a different way to do it. If I export the figure in HTML using the
include_mathjax
argument, axes labels are rendered properly. It's just when I build the documentation using sphinx.For references, please see:
spatialaudio/nbsphinx#369
sphinx-doc/sphinx#6981
and this
The text was updated successfully, but these errors were encountered: