mrpiggi / svg

Handling SVG pictures in LaTeX documents using Inkscape, ImageMagick and/or Ghostscript
Other
65 stars 11 forks source link

Including some files from matplotlib fails, commandline works #41

Open miromarszal opened 3 years ago

miromarszal commented 3 years ago

I have a handful of files from matplotlib that don't like to be included with svg. The one thing they have in common is being created with the imshow command, which means they contain an image. I have no issues with any other files generated with matplotlib.

The relevant part of the log:

Package svg Info: Calling Inkscape on input line 642.
runsystem(inkscape "figures//test.svg" -C --export-latex --export-filename="test_svg-tex.pdf")...executed.

Package svg Warning: The export with Inkscape failed for file
(svg)                `figures//test.svg'
(svg)                Troubleshooting: Please check in the log file how
(svg)                the invocation of Inkscape took place and try to
(svg)                execute it yourself in the terminal on input line 642.

The best part is that I can copy-paste the command to the terminal and it will work like a charm.

I included an example bad file here: test.zip

mrpiggi commented 3 years ago

Which OS you are working with? The path figures//test.svg with two slashes looks odd to me

miromarszal commented 3 years ago

This is on Ubuntu. It does look odd, but it works for other files, so I didn't think it could be the real issue. I checked on a Windows machine and there everything is fine.