diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-19 06:49:06 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-06-23 15:45:37 -0400 |
commit | 633d612bda6a37e1d5f5f878ec5a22a11599f800 (patch) | |
tree | 4676c4e3d7ebe1822af3bc8b2b7758c5b5aba1ce /Documentation/conf.py | |
parent | cc110221918d5564c9dd415cebe62cae4f8d5df5 (diff) |
Docs: Fix breakage with Sphinx 1.5 and upper
Commit 85c21e5c3ee7 (docs-rst: better adjust margins and font size) added a
\usepackage{geometry} that conflicts with another inclusion deep within the
dependencies with newer versions of Sphinx, causing the the PDF build to fail
with a "conflicting parameters" error.
Detect the Sphinx version, using sphinxsetup for Sphinx versions 1.5 and
upper.
Fixes: 85c21e5c3ee74fb75d690c57f7066bae7e2dca55
[jc: Tweaked logic to exclude 1.5.x for x < 3 ]
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r-- | Documentation/conf.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 9eff2c8f7f67..71b032bb44fd 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py | |||
@@ -271,8 +271,6 @@ latex_elements = { | |||
271 | 271 | ||
272 | # Additional stuff for the LaTeX preamble. | 272 | # Additional stuff for the LaTeX preamble. |
273 | 'preamble': ''' | 273 | 'preamble': ''' |
274 | % Adjust margins | ||
275 | \\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry} | ||
276 | \\usepackage{ifthen} | 274 | \\usepackage{ifthen} |
277 | 275 | ||
278 | % Allow generate some pages in landscape | 276 | % Allow generate some pages in landscape |
@@ -343,6 +341,12 @@ latex_elements = { | |||
343 | if major == 1 and minor > 3: | 341 | if major == 1 and minor > 3: |
344 | latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n' | 342 | latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n' |
345 | 343 | ||
344 | if major == 1 and minor <= 4: | ||
345 | latex_elements['preamble'] += '\\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry}' | ||
346 | elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)): | ||
347 | latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=0.5in' | ||
348 | |||
349 | |||
346 | # Grouping the document tree into LaTeX files. List of tuples | 350 | # Grouping the document tree into LaTeX files. List of tuples |
347 | # (source start file, target name, title, | 351 | # (source start file, target name, title, |
348 | # author, documentclass [howto, manual, or own class]). | 352 | # author, documentclass [howto, manual, or own class]). |