-
Notifications
You must be signed in to change notification settings - Fork 18
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
Test latex equations #8
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Ran into this issue with our local documentation. Currently there seems to be no native math implementation for html in sphinx, just with mathjax or rendering as image. Cause image rendering is not so good (e.g. due to zooming/scaling in some html viewers used to display documentation) a better solution should be provided. As it seems to fully ship mathjax in the html build seems to be no good idea. to have it locally installed for the pdf builds seems ok. Due to your knowledge: Is there any other (maybe simpler) solution available, maybe with another directive? |
Seems to be this could be solved by |
The MathJax package seems to be about ~ 25 MB large. So deploying for the build with any document is not helpful. For the simplepdf build it is ok to use a centralised version, cause no html gets delivered |
Using https://pypi.org/project/sphinx-mathjax-offline/ Math output is working for the html builder.
to the html
fixes the problem. Generated HTML shows now proper math equations. But generated pdf does not. |
Finaly solved for me by adding / using
Math output is properly shown in html and could also be scaled properly in html, singlepagehtml and weasyprint pdf. |
|
Thanks for the investigation and the excellent report. At least we should document this somewhere in the docs. Do you think we should force the installation of |
I think documentation would be necessary, also an example solution in the demo pdf
I think not. Reasons for me are:
Documentation of the solution in the docs and demo config would be enough for me. |
This was the fix for jupyter-book + mathjax: I guess a similar could apply here? The solution from there was: # set the below flag to always to enable maths in singlehtml builder
if app.builder.name == "singlehtml":
app.set_html_assets_policy("always") I haven't tried to do this yet, and I haven't even used simplepdf before (I came across this while checking for the solution in various builders), but thought it might help... |
@kreuzberger I am facing similar issue described here. If I use |
Added an equation like yours to my test document, everything seems to look good. (The equation is just a little to high, would be better to have it centered to the textline). But the rendering is ok. So maybe more or less a bug in the versions your may use. |
Not sure which mechanism is used here.
Maybe it is really raw-latex code, then it would not be possible.
But if the author is using some of the HTML math extensions, it should work:
https://www.sphinx-doc.org/en/master/usage/extensions/math.html
But we should test and document it.
https://groups.google.com/g/sphinx-users/c/r4ahhcagNK0/m/PMZ9EDJYAQAJ
The text was updated successfully, but these errors were encountered: