[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180409002239.163177-138-alexander.levin@microsoft.com>
Date: Mon, 9 Apr 2018 00:24:40 +0000
From: Sasha Levin <Alexander.Levin@...rosoft.com>
To: "stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Mauro Carvalho Chehab <mchehab@...pensource.com>,
Sasha Levin <Alexander.Levin@...rosoft.com>
Subject: [PATCH AUTOSEL for 4.9 138/293] Docs: Fix breakage with Sphinx 1.5
and upper
From: Mauro Carvalho Chehab <mchehab@...pensource.com>
[ Upstream commit 633d612bda6a37e1d5f5f878ec5a22a11599f800 ]
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@...pensource.com>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
---
Documentation/conf.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 6219b9a788f4..2ed91d610254 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -271,8 +271,6 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
'preamble': '''
- % Adjust margins
- \\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry}
\\usepackage{ifthen}
% Allow generate some pages in landscape
@@ -337,6 +335,12 @@ latex_elements = {
if major == 1 and minor > 3:
latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
+if major == 1 and minor <= 4:
+ latex_elements['preamble'] += '\\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry}'
+elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
+ latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=0.5in'
+
+
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
--
2.15.1
Powered by blists - more mailing lists