linux/Documentation/sphinx
Akira Yokosawa c9edbe1eb9 docs: sphinx/kfigure.py: Use rsvg-convert(1) for DOT -> PDF conversion
On openSUSE, dot(1) command does not support direct PDF output.
On other distros, generated PDF images have unnecessarily wide margins,
especially for small graphs.

By using dot(1) for DOT -> SVG, then rsvg-convert(1) for SVG -> PDF,
more optimal PDF images can be obtained, with the bonus of improved
portability across various distros.

Add rules in kfigure.py so that the above mentioned route is taken
when rsvg-convert(1) is available.

Note that rsvg-convert(1) is recommended by sphinx_pre_install.
So it is most likely that existing systems for building pdfdocs have
rsvg-convert(1) installed.

Note:
    SVG features supported by rsvg-convert(1) vary depending on its
    version and distro config.
    For example, the one found on Ubuntu Bionic (version 2.40.20) does
    poor job in rendering some of SVG files drawn by Inkscape.
    SVG files generated by dot(1) are converted nicely even with such
    old versions of rsvg-convert.

    So this change does not affect the quality of such figures in any
    way.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/15b56dd3-081a-2469-c3a4-dfc1ca4c6c2d@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-02-09 17:00:41 -07:00
..
automarkup.py docs: automarkup.py: Fix invalid HTML link output and broken URI fragments 2022-01-07 09:32:58 -07:00
cdomain.py Move our minimum Sphinx version to 1.7 2021-02-01 16:29:12 -07:00
kernel_abi.py Documentation/sphinx: fix typos of "its" 2021-12-23 12:42:47 -07:00
kernel_feat.py Documentation/sphinx: fix typos of "its" 2021-12-23 12:42:47 -07:00
kernel_include.py docs: sphinx-extensions: add metadata parallel-safe 2016-09-01 08:19:02 -06:00
kerneldoc.py Move our minimum Sphinx version to 1.7 2021-02-01 16:29:12 -07:00
kernellog.py Move our minimum Sphinx version to 1.7 2021-02-01 16:29:12 -07:00
kfigure.py docs: sphinx/kfigure.py: Use rsvg-convert(1) for DOT -> PDF conversion 2022-02-09 17:00:41 -07:00
load_config.py docs: load_config.py: ensure subdirs end with "/" 2019-07-19 08:49:27 -03:00
maintainers_include.py Docs: drop Python 2 support 2021-02-01 17:17:14 -07:00
parallel-wrapper.sh docs: Fix empty parallelism argument 2020-02-25 03:11:04 -07:00
parse-headers.pl tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
requirements.txt docs: sphinx-requirements: Move sphinx_rtd_theme to top 2021-08-12 09:15:38 -06:00
rstFlatTable.py docs: sphinx: Fix couple of spellings in the file rstFlatTable.py 2021-03-06 17:36:50 -07:00