From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-dm3nam03on0104.outbound.protection.outlook.com ([104.47.41.104]:17478 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755378AbeDIAad (ORCPT ); Sun, 8 Apr 2018 20:30:33 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 138/293] Docs: Fix breakage with Sphinx 1.5 and upper Date: Mon, 9 Apr 2018 00:24:40 +0000 Message-ID: <20180409002239.163177-138-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Mauro Carvalho Chehab [ 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 fa= il 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 Signed-off-by: Sasha Levin --- 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 =3D { =20 # Additional stuff for the LaTeX preamble. 'preamble': ''' - % Adjust margins - \\usepackage[margin=3D0.5in, top=3D1in, bottom=3D1in]{geometry} \\usepackage{ifthen} =20 % Allow generate some pages in landscape @@ -337,6 +335,12 @@ latex_elements =3D { if major =3D=3D 1 and minor > 3: latex_elements['preamble'] +=3D '\\renewcommand*{\\DUrole}[2]{ #2 }\n= ' =20 +if major =3D=3D 1 and minor <=3D 4: + latex_elements['preamble'] +=3D '\\usepackage[margin=3D0.5in, top=3D1= in, bottom=3D1in]{geometry}' +elif major =3D=3D 1 and (minor > 5 or (minor =3D=3D 5 and patch >=3D 3)): + latex_elements['sphinxsetup'] =3D 'hmargin=3D0.5in, vmargin=3D0.5in' + + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). --=20 2.15.1