-
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
errors loading plotly graphs with latex #572
Comments
Can you please provide a minimal reproducible example? |
Sure, with Without any changes in conf.py ( |
Thanks for the examples. The aren't really minimal, though. |
Any updates on this? @mgeier |
Not from my side. I'm waiting for a minimal example for me to reproduce and investigate the problem. |
Could you please check if this works? |
Thanks, this is still more complicated than necessary, but I can work with it! IMHO, this should just work regardless of the value of The problem (or rather one of the problems) seems to be that plotly inserts this code into the HTML page: if (window.MathJax) {MathJax.Hub.Config({SVG: {font: "STIX-Web"}});} ... and Sphinx defines You should make another minimal example without mathjax3_config = {'tex': {'processEscapes': True}} (EDIT: fixed If this causes the same error (which I think it does), you can create an issue at the plotly issue tracker. |
In the meantime, you can work around this problem by either downgrading Sphinx to below version 4 or by manually switching to MathJax 2 like this: mathjax_path = 'https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
mathjax2_config = {
'tex2jax': {
'inlineMath': [['$', '$'], ['\\(', '\\)']],
'processEscapes': True,
'ignoreClass': 'document',
'processClass': 'math|output_area',
}
} |
Thank you very much! I will make an issue in plotly soon. |
In the meantime, plotly/plotly.js#6073 has been merged. Maybe it works now with MathJax 3? |
I am trying to plot Plotly graphs inside sphinx documentation, but it seems MathJax is causing some issues.
In the documentation, MathJax v3 is being loaded, which causes errors because
MathJax.hub
doesn't exist anymore.MathJax v3 should work with plotly because
is also present in the documentation
(see here as well please)
However, if I set
nbsphinx_assume_equations = False
inconf.py
and remove Latex in cells, I am able to see the figure, because MathJax is no longer loaded.Could someone please tell me how to solve this?
The text was updated successfully, but these errors were encountered: