Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754835AbcKAWoe (ORCPT ); Tue, 1 Nov 2016 18:44:34 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:42042 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbcKAWoa (ORCPT ); Tue, 1 Nov 2016 18:44:30 -0400 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Jim Davis , Jonathan Corbet , linux-kernel , Mauro Carvalho Chehab Subject: [PATCH RFC 1/4] docs-rst: fix PDF build errors Date: Tue, 1 Nov 2016 16:44:10 -0600 Message-Id: <3f76da060931fae3b94e1f349df37f15955cd740.1478040090.git.mchehab@osg.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 49 PDF build on Kernel 4.9-rc? returns an error. This is because we're re-defining a command too late. Move such redefinition to LaTeX preamble. Tested by building the documentation on interactive mode: make PDFLATEX=xelatex -C Documentation/output/./latex Fixes: e61a39baf74d ("[media] index.rst: Fix LaTeX error in interactive mode on Sphinx 1.4.x") Signed-off-by: Mauro Carvalho Chehab --- Documentation/conf.py | 4 ++++ Documentation/media/index.rst | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/conf.py b/Documentation/conf.py index d9bad21dd427..814c336e5f5e 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -332,6 +332,10 @@ latex_elements = { ''' } +# Fix reference escape troubles with Sphinx 1.4.x +if minor > 3: + latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }' + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). diff --git a/Documentation/media/index.rst b/Documentation/media/index.rst index e347a3e7bdef..7f8f0af620ce 100644 --- a/Documentation/media/index.rst +++ b/Documentation/media/index.rst @@ -1,11 +1,6 @@ Linux Media Subsystem Documentation =================================== -.. Sphinx 1.4.x has a definition for DUrole that doesn't work on alltt blocks -.. raw:: latex - - \renewcommand*{\DUrole}[2]{ #2 } - Contents: .. toctree:: -- 2.7.4