-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
imgmath: Allow embedding images in HTML as base64 #10816
Conversation
be0c5b2
to
c06244a
Compare
09032fa
to
fa4c579
Compare
@jschueller please don't force-push, I'll squash on merge. A |
oh, ok |
Please may you add some tests for the new behaviour, and an entry in CHANGES? A |
As a design point, I'd suggest splitting We would always call the function that creates the temporary image, but the flag would control if we called the This then means we always know the mime type and don't have to use the guess functions, and don't need to remove any images, as they're in temp directories anyway. A |
101905b
to
d04a440
Compare
@AA-Turner the move is now in a separate function get_img_src, but I dont have as many functions as suggested, |
# Conflicts: # CHANGES
Thanks Julien! A |
thanks! |
@AA-Turner it seems it does not work in parallel (using -j4 flag), any idea why ?
|
Could you open a new issue please, or a PR adding a failing test for parallel building? A |
ok, see #10869 |
A new flag imgmath_embed allows to include LaTeX output images as inline base64 into the HTML instead of separate png/svg files, using:
<img class="math" src="data:image/svg+xml;base64,ocmVmPScjZzEtNzMnL...>
This allows to avoid uploading many small files for continuous integration artifacts.
The latex output file is removed after encoding.
inspired from https://github.com/sphinx-contrib/imageembed