diff --git a/docs/contents/demo.md b/docs/contents/demo.md index 5ffab879..2164e3d7 100644 --- a/docs/contents/demo.md +++ b/docs/contents/demo.md @@ -277,8 +277,7 @@ _gen/my_data_mean-sco.md Conversions for Gadfly are also included, see @fig:example_plot. This is actually a bit tricky, because we want to show vector graphics (SVG) on the web, but these are not supported (well) by LaTeX. Therefore, portable network graphics (PNG) images are passed to LaTeX via cairosvg; -I found that this tool does the best conversions without relying on Cairo.jl. -(Cairo.jl doesn't work for me on NixOS.) +I found that this tool does the best conversions without relying on Cairo and/or Fontconfig, which are not so stable in combination with Compose in my experience. ```{.include} _gen/example_plot-sco.md diff --git a/src/outputs/compose.jl b/src/outputs/compose.jl index fce8550d..c8a385d7 100644 --- a/src/outputs/compose.jl +++ b/src/outputs/compose.jl @@ -39,9 +39,11 @@ function convert_gadfly_output(path, out; svg_filename = "$file.svg" svg_path = joinpath(im_dir, svg_filename) write_svg(svg_path, out, width, height) + png_filename = "$file.png" png_path = joinpath(im_dir, png_filename) svg2png(svg_path, png_path) + im_link = joinpath("im", svg_filename) caption, label = caption_label(path, caption, label) pandoc_image(file, png_path; caption, label)