jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 569 forks source link

LaTeX and PDF export: Incorrect export of SVG images included via `![]()` #2192

Open aravindh-krishnamoorthy opened 6 days ago

aravindh-krishnamoorthy commented 6 days ago

Problem description

Presently, SVG images can be directly included in Jupyter notebooks via the ![SVG file](file.svg) directive. However:

Version Info

nbconvert 7.16.4

How to reproduce

Workaround

aravindh-krishnamoorthy commented 6 days ago

Note that an alternative fix is to use the svg2pdf.py preprocessor to "pre-convert" the SVG file included via ![]() into PDF, as it is currently done for image/svg+xml.

IMHO the \includepackage{svg} method is better. However, this is open and up for debate.

t-makaro commented 5 days ago

Duplicate of #244

aravindh-krishnamoorthy commented 5 days ago

Duplicate of #244

I'm not sure if #244 and this are duplicates... cells with MIME type image/svg+xml (which #244 is referring to via plot) are already correctly filtered via svg2pdf preprocessor... whereas this issue is about SVG files included via ![]()...

t-makaro commented 4 days ago

244 is definitely about SVGs in markdown cells with ![](....svg). There are other issues around the svg2pdf preprocessor that you might be thinking of.