2018-04-12 23:02:18 +09:00
|
|
|
.. _sphinx.ext.imgconverter:
|
|
|
|
|
|
2018-06-08 17:27:13 +01:00
|
|
|
:mod:`sphinx.ext.imgconverter` -- A reference image converter using Imagemagick
|
|
|
|
|
===============================================================================
|
2017-03-07 14:10:23 +09:00
|
|
|
|
|
|
|
|
.. module:: sphinx.ext.imgconverter
|
|
|
|
|
:synopsis: Convert images to appropriate format for builders
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6
|
|
|
|
|
|
2018-06-08 17:27:13 +01:00
|
|
|
This extension converts images in your document to appropriate format for
|
|
|
|
|
builders. For example, it allows you to use SVG images with LaTeX builder.
|
2017-03-07 14:10:23 +09:00
|
|
|
As a result, you don't mind what image format the builder supports.
|
|
|
|
|
|
|
|
|
|
Internally, this extension uses Imagemagick_ to convert images.
|
|
|
|
|
|
|
|
|
|
.. _Imagemagick: https://www.imagemagick.org/script/index.php
|
|
|
|
|
|
2018-06-08 17:27:13 +01:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
Imagemagick rasterizes a SVG image on conversion. As a result, the image
|
|
|
|
|
becomes not scalable. To avoid that, please use other image converters like
|
|
|
|
|
`sphinxcontrib-svg2pdfconverter`__ (which uses Inkscape or
|
|
|
|
|
``rsvg-convert``).
|
|
|
|
|
|
|
|
|
|
.. __: https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
|
2018-04-12 23:14:10 +09:00
|
|
|
|
|
|
|
|
|
2017-03-07 14:10:23 +09:00
|
|
|
Configuration
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
.. confval:: image_converter
|
|
|
|
|
|
|
|
|
|
A path to :command:`convert` command. By default, the imgconverter uses
|
|
|
|
|
the command from search paths.
|
2017-04-22 13:26:09 +09:00
|
|
|
|
|
|
|
|
.. confval:: image_converter_args
|
|
|
|
|
|
|
|
|
|
Additional command-line arguments to give to :command:`convert`, as a list.
|
|
|
|
|
The default is an empty list ``[]``.
|