Skip to content

Commit d987d5a

Browse files
akiyksJonathan Corbet
authored andcommitted
docs: kfigure.py: Don't warn of missing PDF converter in 'make htmldocs'
SVG -> PDF conversion is not required in "make htmldocs". It is pointless to always warn of a missing converter. Demote the log message in setupTools() to verbose. For "make pdfdocs" (or "make latexdocs"), promote the dynamic message of "include SVG raw" to a warn. Expand the message and recommend installing Inkscape or ImageMagick. Fixes: 8ccd056 ("docs: sphinx/kfigure.py: Use inkscape(1) for SVG -> PDF conversion") Signed-off-by: Akira Yokosawa <akiyks@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-doc@vger.kernel.org Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> Link: https://lore.kernel.org/r/c80e1481-10d4-7151-fe59-e846259eb0d4@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 8d6451b commit d987d5a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Documentation/sphinx/kfigure.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def setupTools(app):
212212
if convert_cmd:
213213
kernellog.verbose(app, "use convert(1) from: " + convert_cmd)
214214
else:
215-
kernellog.warn(app,
215+
kernellog.verbose(app,
216216
"Neither inkscape(1) nor convert(1) found.\n"
217217
"For SVG to PDF conversion, "
218218
"install either Inkscape (https://inkscape.org/) (preferred) or\n"
@@ -296,8 +296,10 @@ def convert_image(img_node, translator, src_fname=None):
296296

297297
if translator.builder.format == 'latex':
298298
if not inkscape_cmd and convert_cmd is None:
299-
kernellog.verbose(app,
300-
"no SVG to PDF conversion available / include SVG raw.")
299+
kernellog.warn(app,
300+
"no SVG to PDF conversion available / include SVG raw."
301+
"\nIncluding large raw SVGs can cause xelatex error."
302+
"\nInstall Inkscape (preferred) or ImageMagick.")
301303
img_node.replace_self(file2literal(src_fname))
302304
else:
303305
dst_fname = path.join(translator.builder.outdir, fname + '.pdf')

0 commit comments

Comments
 (0)