-
Notifications
You must be signed in to change notification settings - Fork 41
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 compatibility with Mathjax3 #85
Comments
What are you using to render that? Mathjax is the one that's currently supported. See https://sphinx-hoverxref.readthedocs.io/en/latest/usage.html#tooltip-with-mathjax |
It is using mathjax |
Do you have I didn't find that option in your repository: https://github.com/wpilibsuite/frc-docs/blob/master/source/conf.py#L61 |
Oh no. I do not. Can I ask why it's not enabled by default? |
It's not enabled by default because it triggers some "javascript magic events" to re-render all the formulas in the page; which is not required if mathjax is not used. If you are curios, see https://github.com/readthedocs/sphinx-hoverxref/blob/master/hoverxref/_static/js/hoverxref.js_t#L112 --I'm not proud of that code, but I didn't find a better way of doing it, 😄 Please, let me know if that worked for you and feel free to close the issue in that case. |
This issue is still present. See the "state" and "inputs" term on this page https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/physics-sim.html and confirmed mathjax for hoverxref is enabled. |
I guess this is happening because you are using a mathjax version different than the default one? https://github.com/wpilibsuite/frc-docs/blob/d320917fa10928dbdcb87b01f21e3f93187378d8/source/conf.py#L138 If you open the browser console, you will see that the hoverxref code that tries to render latex is being triggered, but it's not defined.
So, I guess that Mathjax3 changed the API and hoverxref is not compatible with it. |
Mathjax3 will be the default as of Sphinx 4 as it offers much better page loading times and other optimizations. It'd be great to see hoverxref move toward this. I'll rename the issue |
Just wanted to bump this issue, as Sphinx 4 will be released within the next month per sphinx-doc/sphinx#8195 |
Another ding. Sphinx 4 will be releasing this month, and this extension will be broken with the now default Mathjax 3 |
@Daltz333 I'm following Sphinx releases closely. However, I haven't had the time to work on this issue. Would you like to do some research about the changes required and start a draft PR? |
I will look into it. |
I did a little bit of investigation. It seems an immediate issue is that MathJax3 uses promises rather than queue. There is a handy little converter https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html that works on configuration objects, but not queue. I'm looking into it now. |
I attempted to use typeset promise, but I was not able to get it to work |
Just wanted to note here that Sphinx 4 includes a new feature that breaks some compatibility with this extension. See sphinx-doc/sphinx#9115 I think it would be good to mention these limitations in the Latest fully supported Sphinx version is |
See https://frc-docs--639.org.readthedocs.build/en/639/docs/software/advanced-controls/state-space/state-space-intro.html#wpilib-s-linearsystemloop
The text was updated successfully, but these errors were encountered: