-
Notifications
You must be signed in to change notification settings - Fork 11
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
offline css and fonts #122
Comments
The default behavior at the moment is to fetch The KaTeX version set in the config is always set to match the one of the But I'm also open to changes, e.g. I can't remember why I decided to not bundle the CSS file with the extension together, whereas for the other files it seems to be the case. |
Sorry, I misinterpreted sphinxcontrib-katex/sphinxcontrib/katex.py Lines 374 to 388 in 296c71e
You need to install indeed sphinxcontrib-katex/.github/workflows/katex.yml Lines 35 to 37 in 296c71e
So it is possible to get a non-matching This will then also not be solved by
as we will not bundle the As |
I think this is a documentation bug. Only |
Thanks for pointing this out. I removed the And we can also pass on the path to sphinxcontrib-katex/sphinxcontrib/katex.py Lines 385 to 386 in 77aab65
The only thing missing is that this respects the |
Thanks yourself @hagenw for swift response and action! I can try out a pull request if you make one for |
I have now released version 0.9.10, including the changes from #128 |
Great! @hagenw , you wanted to keep the bug open for some thoughts in #128 (comment) , can you explain it in more detail here? |
Yes, at the moment BTW, for |
You can set it to a local file, and that's what I did with the following lines:
Sphinx inserts these html tags in the resulting documentation:
|
Great, that's better than I had expected. Then the only remaining question is if we should include the CSS file as well with the extension instead of loading it from an external URL. I would vote for staying with the current solution as providing the CSS file via CDN has advanatges over a local file on the server. Nonetheless, we could think about adding |
me too
Then we need to bundle the fonts as well, a total of 2.3 MB data. I'll let you decide. |
OK, as the current package is around 96K, I would vote against bundling the CSS file and fonts with it. I will close this issue for now. |
I found out that even with
katex_prerender=True
the generated documentation wants to fetchkatex.min.css
from the Internet. I've solved it by installinglibjs-katex
Ubuntu package and added the following to myconf.py
:The problem is now that the css comes from a different katex version than what was used to render the HTML. I seek advice here how we should solve the problem:
katex.min.js
path configurable inkatex-server.js
so I can point it to/usr/share/javascript/katex/katex.js
, orThe text was updated successfully, but these errors were encountered: