Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using librsvg over Inkscape #745

Open
clkao opened this issue Jan 28, 2018 · 8 comments
Open

Consider using librsvg over Inkscape #745

clkao opened this issue Jan 28, 2018 · 8 comments

Comments

@clkao
Copy link

clkao commented Jan 28, 2018

Inkscape, which is now in the minimal-notebook image, pulls in about 120M dependency. For standalone use it's also an additional requirement to install a large GUI app.

We should consider using librsvg-convert or svg42pdf python library.

@takluyver
Copy link
Member

svg42pdf looks like a handy tool for this, though I'm a bit wary that it might produce confusingly different results on different systems depending on what tools are installed.

I think we went with inkscape because there's a good chance of users already having it installed, but it's definitely not optimal for installing into docker containers for this functionality.

@andreas-zeller
Copy link

As of macOS 10.15 "Catalina", the stable version of Inkscape no longer runs (it's 32-bit), and the Inkscape 64-bit beta lacks the "inkscape" command-line executable. You may want to look at the recently released CairoSVG https://cairosvg.org as an alternative.

@MSeal
Copy link
Contributor

MSeal commented Oct 21, 2019

That might be something to investigate for nbconvert 6 release. We should take a closer look at the library.

@MSeal MSeal added this to the 6.0 milestone Oct 21, 2019
@mgeier
Copy link
Contributor

mgeier commented Dec 20, 2019

If librsvg should be used, somebody should probably make a Windows package for conda-forge, see conda-forge/librsvg-feedstock#40

@mgeier
Copy link
Contributor

mgeier commented Apr 16, 2020

FYI, a windows version is now available:

conda-forge/librsvg-feedstock#45
https://anaconda.org/conda-forge/librsvg

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/svg-in-jupyter-conversion-with-nbconvert-fails/2724/15

@benz0li
Copy link

benz0li commented Jul 26, 2022

See JuliaLang/IJulia.jl#1038 (comment) on how to configure IPython and IRkernel

to output both image/svg+xml and application/pdf plot formats in the notebook file:

  • image/svg+xml for plot display in the browser
    + HTML conversion using SVG instead of PNG
  • application/pdf for direct PDF conversion

ℹ️ With application/pdf plot format in the notebook file, inkscape is not required for PDF conversion using nbconvert.

See JuliaPlots/Plots.jl#4288 about a possible solution for IJulia when using Plots.jl.

@benz0li
Copy link

benz0li commented Aug 29, 2022

Inkscape has been removed from the minimal-notebook: jupyter/docker-stacks#1765

@clkao May you close this issue?

FYI @mathbunnyru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants