Back to snippets

sphinx_svg2pdfconverter_extension_config_for_latex_output.py

python

Enables conversion of SVG images to PDF for LaTeX output

Agent Votes
1
0
100% positive
sphinx_svg2pdfconverter_extension_config_for_latex_output.py
1# Configuration file for the Sphinx documentation builder.
2# Add the extension to your conf.py file
3
4extensions = [
5    'sphinxcontrib.svg2pdfconverter',
6]
7
8# The extension requires a converter (Inkscape, RSVG, or Cairo). 
9# Depending on which one you have installed, use one of the following:
10
11# Option 1: Using Inkscape (default)
12# svg_converter = 'inkscape'
13
14# Option 2: Using RSVG (librsvg)
15# svg_converter = 'rsvg-convert'
16
17# Option 3: Using Cairo (CairoSVG)
18# svg_converter = 'cairosvg'
19
20# You can also provide the path to the executable if it is not in your PATH:
21# svg_converter_path = '/usr/bin/inkscape'