Skip to content

Two cleanups for Sphinx conf.py

Mauro Carvalho Chehab lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2docs-rst: conf.py: remove lscape from LaTeX preambleDocumentation/conf.py+0 -30 replies
2/2docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6Documentation/conf.py+43 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Two cleanups for Sphinx conf.py

Hi Jon,

Those patches are just cleanups for Documentation/conf.py.

The first one removes a package usage directive for a LateX package that it is not used.

The second one moves some LaTeX preamble code that it is used only on Sphinx 1.4 and 1.5 to a separate if. On Sphinx 1.6, the macros there are silently ignored. While the conf.py becomes a little bit more complex, it clearly marks the backward-compatible code, with IMHO, it is a good idea, specially as some day, we may drop support for older Sphinx versions.

None of those patches are mandatory. Feel free to apply any time you want (or discard them, if you don't thing it is worth).

Please notice that the second patch will trivially conflict with a patch I sent before, removing \\usepackage{adjustbox}.

I suspect that, if you apply those two patches before the one I sent eariler, you'll avoid the conflict.

Anyway, if you apply all tree patches, you'll have a Latex Sphinx-independent preamble with just:

     'preamble': '''
       % Use some font with UTF-8 support with XeLaTeX
        \\usepackage{fontspec}
        \\setsansfont{DejaVu Serif}
        \\setromanfont{DejaVu Sans}
        \\setmonofont{DejaVu Sans Mono}
     '''
}

And all version-dependent preamble inserted after testing for the Sphinx version.

Mauro Carvalho Chehab (2):
docs-rst: conf.py: remove lscape from LaTeX preamble
docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6

 Documentation/conf.py | 65 ++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 22 deletions(-)
Signature · 1 line
2.13.5