SVG in jupyter conversion with nbconvert fails

Hi all,

I’m using juypter for a school assignment (deadline coming monday) and the conversion to pdf is not working as expected. I have some programatically generated svgs that I would like to be in the pdf but somehow LaTeX/nbconvert is choking on it. I found another lost soul with similar problems on the stackoverflow below.

Is there a simple fix for this? As a last resort converting the SVGs to some other format (e.g. PNG) but that removes all the nice vectorized features that come with SVGs.

(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
Overfull \hbox (156.02196pt too wide) in paragraph at lines 587--587
[]\TU/lmtt/m/n/10.95 gplot(sg,locs_x,locs_y,nodefillc[]=[]nodefillc,nodelabel[]
=[]latexedLabels,nodesize[]=[]nodesize,edgelabel[]=[]edgelabel)|  
[1] [2] [3] [4] [5] [6] [7]

! LaTeX Error: Cannot determine size of graphic in full3_8.svg (no BoundingBox)
.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.707     \includegraphics{full3_8.svg}

If I recall correctly, pdflatex understands png, jpg, and pdf files.

There is an svg Latex package that automatically uses Inkscape to convert the image as the Latex is compiling, which might be useful, but that would require I think having inkscape installed and somehow getting that command changed to \includesvg{...}, as well as including the svg package.

1 Like