readthedocs/readthedocs-docker-images

Can you please install the package "librsvg2-bin"?

Closed this issue ยท 4 comments

This would allow auto-converting SVG images to PDF images with the Sphinx extension https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter.

There is an old issue about converting SVG to PDF which would be properly solved by this: #905.

Alternatively, Inkscape could be installed, but librsvg2-bin is much more lightweight, even more so since its dependency librsvg2-2 seems to be already installed.

Using the built-in Sphinx extension sphinx.ext.imgconverter (http://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html) would be and alternative (but much inferior) solution. This uses convert from ImageMagick (see #3979 and #70), which rasterizes vector graphics and produces bitmaps.

Expected Result

When the PyPI package sphinxcontrib-svg2pdfconverter is installed and 'sphinxcontrib.rsvgconverter' is listed in the extensions in conf.py, SVG images should be automatically be converted to PDF images to be included in the LaTeX/PDF output.

Actual Result

Running Sphinx v1.8.1
...
building [latex]: all documents
...
WARNING: RSVG converter command 'rsvg-convert' cannot be run. Check the rsvg_converter_bin setting
...

Moving this to our docker build images, this is feature addition there.

Edit: thanks GitHub issue transfer! ๐ŸŽ‰

Also, the change is pretty easy, feel free to open a PR against our master branch

Thanks @agjohnson, I've created #79, I hope that's the right way.

FYI, the issue transfer disabled two issue links in the original issue description.