Skip to content

Loading…

nbconvert does not process SVGs into PDFs #3693

Closed
dpsanders opened this Issue · 6 comments

4 participants

@dpsanders

nbconvert does not manage to take the final step to transform SVGs into PDFs and hence breaks figure inclusion in the final pdflatex call to generate PDF files using, for example, the --format="latex" and --format="sphinx_howto" options.

This is despite the technology being ready and waiting in IPython/nbconvert/transformers/svg2pdf.py. (Requires inkscape to do the conversion.)

Crucial for 1.0.

By the way, I am on Mac OS but installed inkscape with brew, so the logic to choose the Mac OS version of inkscape will fail in my case. It should check if the command line inkscape is not already available.

@dpsanders dpsanders referenced this issue
Closed

Upcoming issues with nbconvert #3603

3 of 7 tasks complete
@jakobgager

I can confirm this on linux as well. The SVGs get embedded like "ordinary" images without any conversion.
Maybe @jdfreder can bring some light into this issue?

@jdfreder
IPython member

Thanks guys, I'll check this out right now

@minrk
IPython member

I've got this just about figured out - the main issue is that SVG2PDF is before extract figures in the transformer list, so it doesn't do anything.

@jdfreder
IPython member

That could be a problem... haha
Also, another possibility is the data priority (in the nbconvert base class). It may need to be overwriten for the Latex case, svg excluded.
Lastly, the templates themselves may current have 'svg' instead of 'pdf'

@dpsanders
@minrk minrk referenced this issue
Merged

fix SVG2PDF #3695

@minrk
IPython member

Should be fixed by #3695.

@minrk minrk closed this in #3695
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.