I'm doing an internship for an IT company which needs a document application for its firmware docs (md files).
The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs.
I've searched around and I found this solution from 2 years ago, which was essentially what I was looking for: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images. I tried to implement it but I'm not an expert with GNU makefiles and I don't know if the current version of Sphinx allows it or if it is out there an easy workaround, so the thing didn't succeed.
Does someone have a viable solution for this?
Since Sphinx 1.6 version you can use bundled extension sphinx.ext.imgconverter for automatic conversion your SVG into PNG:
Open your source/conf.py
and add to extensions
variable this string:
extensions = [
'sphinx.ext.imgconverter',
]
Run build:
make latexpdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With