Skip to content

Transparent SVGs not rendered correctly in PDF with ipython nbconvert #2252

Closed
@dpsanders

Description

@dpsanders

With the new ipython nbconvert facility, a standard workflow would be as follows:

  • Create an IPython notebook with SVGs as matplotlib output:

    %config InlineBackend.figure_format = "svg"

  • Export to latex via [new syntax decided yesterday/today!]:

    ipython nbconvert --to latex mynotebook.ipynb

During this process, the SVGs produced by matplotlib get converted to PDF by inkscape, which does a great job and keeps all the transparency etc.

However, now running pdflatex or xelatex on the .tex result [which is now stored in the same directory as the original .ipynb and not inside an nbconvert_build directory] produces a PDF in which transparent PDFs are not rendered correctlly.

This is apparently a known problem, but the proposed solutions do not seem to work for me. Are there any PDF experts who can shed light on this and propose a solution? This is a deal-breaker for the PDF export at the moment, especially in combination with the new ggplot styles etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions