-
Notifications
You must be signed in to change notification settings - Fork 132
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 a plotly figure is not rendered #369
Comments
Can you please point me to an example of those axis titles? |
Once you have built the docs you can find an example at: |
BTW, you should use the Matplotlib settings recommended at https://nbsphinx.readthedocs.io/en/latest/code-cells.html#Plots |
I don't know what I'm supposed to see there. Can you please describe what you are expecting to see there and what you are actually seeing? Probably some screenshots would help clarify? |
OK, thanks, with those screenshots your description makes more sense ... I don't see any of this LaTeX stuff in the axis labels ... are you sure you have pushed all your changes to your branch? |
None of that is on readthedocs yet if that is what you mean. Everything is pushed to the branch, though, so if you build it locally you should definitely arrive at the same result. |
OK, sorry, I've deleted the cell outputs and re-created them and the LaTeX stuff was gone. If I use your pre-generated outputs, I see the LaTeX problem ... |
In your generated HTML files some MathJax-related stuff seems to be missing. I would expect the HTML to contain something like this: <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script> The first tag is normally added by Sphinx when The second tag is normally added by Lines 1825 to 1835 in 7a6d64f
I had no clue why those are missing in your case ... but then it dawned on me: Sphinx has this feature where MathJax is only loaded if at least one equation is used on some page. The solution is to add some equation somewhere and everything works! Maybe there is another way to get Sphinx to load MathJax ... I don't know. You could ask the Sphinx folks. |
Indeed, that fixes it! Thank you very much. I will see what I can find out about always including mathjax. |
Now I know: #551. |
I'm working on a project that includes some notebooks in the documentation. We have both plots created with matplotlib and plotly in those. The axis titles of those plots contain latex in order to render units nicely. At the moment the matplotlib ones render properly whereas the plotly latex is not rendered in the documentation. Both render perfectly fine when used interactively.
You can reproduce this issue by checking out the corresponding branch installing the dependencies and generating the documentation.
I'm currently using the following versions:
The text was updated successfully, but these errors were encountered: