imgmath: Allow embedding images in HTML as base64#10816
imgmath: Allow embedding images in HTML as base64#10816AA-Turner merged 16 commits intosphinx-doc:5.xfrom
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