Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203AbcKBPGT convert rfc822-to-8bit (ORCPT ); Wed, 2 Nov 2016 11:06:19 -0400 Received: from smtp2-2.goneo.de ([85.220.129.34]:57188 "EHLO smtp2-2.goneo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756006AbcKBPGQ (ORCPT ); Wed, 2 Nov 2016 11:06:16 -0400 X-Spam-Flag: NO X-Spam-Score: -2.9 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: [PATCH RFC 1/4] docs-rst: fix PDF build errors From: Markus Heiser In-Reply-To: <3f76da060931fae3b94e1f349df37f15955cd740.1478040090.git.mchehab@osg.samsung.com> Date: Wed, 2 Nov 2016 16:06:02 +0100 Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , Jim Davis , Jonathan Corbet , linux-kernel , Mauro Carvalho Chehab Content-Transfer-Encoding: 8BIT Message-Id: <2CA23715-00A7-4F59-87F1-CDC73A03D980@darmarit.de> References: <3f76da060931fae3b94e1f349df37f15955cd740.1478040090.git.mchehab@osg.samsung.com> To: Mauro Carvalho Chehab X-Mailer: Apple Mail (2.1510) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1156 Lines: 34 Am 01.11.2016 um 23:44 schrieb Mauro Carvalho Chehab : > 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 }' Sorry forget to mention: when adding content to the preamble I recommend to add a leading and trailing new-line. -- Markus --