Open riziles opened 1 year ago
Thanks @riziles for the report! We will take a look and get back to you soon!
FYI, I signed up for a paid Curvenote account, and I'm able to export docs with SVGs beautifully from the Curvenote website. However if I use the Curvenote CLI and try to do it locally, I receive the same error message, so I'm guessing it must be either a Windows issue or something specifically wrong with my local setup.
@fwkoch has been redoing all of the image exports in #317 based on thinking through some of this.
Can you run, to see if it is a version mismatch?
convert --version
Error message is Invalid drive specification.
. FYI, my workaround of exporting the SVGs to PDF and just using those still works fine AND it keeps the images from getting rasterized.
convert --version
@rowanc1 , I am a little puzzled by this request. As far as I can tell, convert
is a Windows system command to convert file systems on your hard drive. What does it have to do with rendering SVGs?
Hey @riziles - on unix systems, convert
can be used for imagemagick
- not so much for Windows! However, the recommended cross-platform command for imagemagick
is magick
- I'll update the CLI to use that.
Before getting too ahead of myself though, can you give it a try and make sure it works - ensure imagemagick
is installed, then:
magick -density 600 -colorspace RGB input.svg output.png
Unfortunately it's not possible. ImageMagick requires admin rights to install, and I don't have 'em.
@fwkoch , quick update: there is a portable version on the ImageMagick website. I downloaded that, extracted it, added the folder to my user path list and was able to successfully run the command above. That said, if the proposed solution is just to convert the SVGs to PNGs please don't do that on my account. I'd rather stick with my current workaround of converting them to PDF instead.
WAIT @rowanc1 / @fwkoch ! I just added Inkscape's bin
folder to my Windows path list and all my errors went away and the fully vectorized SVGs are showing up beautifully in my PDF.
We are adding some better docs on this in #317 (see below). We still need to actually change convert
to magick
to ensure that it actually works on Windows. I have updated the issue title as we narrow this down!
Franklin also added support for wildcard extensions (#304) which can be used for explicit export targets for various different platforms (e.g. a gif for web, and a pdf for latex).
convert
tomagick
@rowanc1 , why not stick with Inkscape instead of ImageMagick? They look so much better with Inkscape.
@riziles - Inkscape will still be the preferred conversion library for SVGs, if the user has it installed. (Inkscape handles vectors nicely, imagemagick always rasterizes images during conversion 😞 )
Updating convert
-> magick
will just allow a user without inkscape to convert their images (imagemagick is also used for non-vector images, e.g. gif/tiff/etc. - we don't want these to fail on windows).
I think along with changing convert
-> magick
we should:
magick
that inkscape is much better and should be installed (this warning is already in place, but it could be more forward).Note that the first part of this is going to be merged with #1388.
What version of
mystjs
are you using?0.1.17
How did you install myst?
npm
What operating system are you using?
Windows
Which area is this feature request for?
Export: LaTeX or PDF
Describe the Bug
Running
myst build --pdf
fails if MyST document contains SVG images. Following error message is displayed:Expected Behavior
An exported PDF document.
To Reproduce
sample-doc.md:
This is a test