mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Change `convert` to `magick` to support Windows: SVG images cause PDF export to fail

Open riziles opened this issue 1 year ago • 13 comments

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:

Could not convert from SVG to PNG: 
_build\temp\mystmqG4xb\images\aaecccbb623db43cfbe1b76430ef9e1b.svg 
- Error: Command failed: convert -density 600  -colorspace RGB 
- _build\temp\mystmqG4xb\images\aaecccbb623db43cfbe1b76430ef9e1b.svg 
- _build\temp\mystmqG4xb\images\aaecccbb623db43cfbe1b76430ef9e1b.png
Invalid Parameter - 600

Expected Behavior

An exported PDF document.

To Reproduce

sample-doc.md:

---
exports:
  - format: pdf
---

# SVG Export Test

```{figure} https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg
---
name: svg-export-test
---
SVG MyST Logo
```

This is a test

riziles avatar Mar 07 '23 00:03 riziles