[ENH] Add initial svg handling#371
Conversation
Removes a TODO Adds a supported mime type for latex This currently creates a svg-file from the inline svg component, which can be handled by other tools later This basically fixes executablebooks#370 as their the svg is now not handled as an text type anymore
|
Thanks for submitting your first pull request! You are awesome! 🤗 |
Codecov Report
@@ Coverage Diff @@
## master #371 +/- ##
=======================================
Coverage 87.35% 87.35%
=======================================
Files 12 12
Lines 1368 1368
=======================================
Hits 1195 1195
Misses 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
thanks @JensHeinrich -- I'll leave this open for a day and will look to merge this tomorrow. |
Heya, I don't think this is the answer, because it will break any build that does not have a specific extension installed to handle svg -> pdf conversions, and so should not be the default behaviour. Note, you can already override this priority list in your |
@chrisjsewell my plan is to review this with @AakashGfude tomorrow and follow a similar method that he has used to support |
|
|
|
@JensHeinrich do you use |
|
@chrisjsewell still this way it is not handled as a string, which definitely is wrong (as described in #370) So this way there is no "breaking" change but it is just ignored which seems to be cleaner to me |
|
I
Jupyter-book But as soon as the line is added, the data is available for sphinx to handle |
This is likely because |
What if the outputs in your notebook were only SVG and PNG; surely, in-lieu of any SVG converter, you would want the PNG to appear in your PDF build |
No, the But there is a file which can be handled |
Then probably the |
|
jupyter-book is dependent on myst-nb, but myst-nb is in not dependent on jupyter-book (i.e. can and is used outside of jupyter-book) Closing this as, since #380, this is easy to configure: extensions = ["sphinx.ext.imgconverter"]
nb_mime_priority_overrides = [
# builder name, mime type, priority
("latex", "image/svg+xml", 15)
]this could be added to the documentation |
Removes a TODO
Adds a supported mime type for latex
This currently creates a svg-file from the inline svg component, which can be handled by other tools later
This basically fixes #370 as their the svg is now not handled as an text type anymore