quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.74k stars 305 forks source link

How to specify other SVG conversion tools (Inkscape) into the chain #1144

Open jjallaire opened 2 years ago

jjallaire commented 2 years ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/1140

Originally posted by **fuhrmanator** June 13, 2022 I'm using SVG a lot in my markdown, and it renders nicely (most of the time) in PDF by way of `rsvg-convert` part of the LaTeX chain: > (rsvg-convert.exe:2516): Pango-WARNING **: couldn't load font "Helvetica Not-Rotated 13.640625", falling back to "Sans Not-Rotated 13.640625", expect ugly output. I'd like to use Inkscape instead, as it does some things better, especially with fonts I've installed in Windows. Is there a way to specify that SVG conversions to PDF should be done using Inkscape?
cderv commented 2 years ago

Probably related to https://github.com/quarto-dev/quarto-cli/issues/997 where rsvg-convert was mentioned, as Pandoc is using it directly when PDF writer is used: https://github.com/jgm/pandoc/blob/b263f383040618ff991912512ccd396b83d43da5/src/Text/Pandoc/PDF.hs#L194-L205

997 and this issue are probably about a Lua filter to do the same task (SVG converion), and which would be configurable