Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932413AbdIHTDH (ORCPT ); Fri, 8 Sep 2017 15:03:07 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:58705 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756619AbdIHTDG (ORCPT ); Fri, 8 Sep 2017 15:03:06 -0400 Date: Fri, 8 Sep 2017 16:02:55 -0300 From: Mauro Carvalho Chehab To: Jonathan Corbet Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Two cleanups for Sphinx conf.py Message-ID: <20170908160255.217d0e14@vento.lan> In-Reply-To: <20170908101026.32969fee@lwn.net> References: <20170908101026.32969fee@lwn.net> Organization: Samsung X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 58 Em Fri, 8 Sep 2017 10:10:26 -0600 Jonathan Corbet escreveu: > On Sun, 3 Sep 2017 16:12:44 -0300 > Mauro Carvalho Chehab wrote: > > > Those patches are just cleanups for Documentation/conf.py. > > > > The first one removes a package usage directive for a LateX package > > that it is not used. > > > > The second one moves some LaTeX preamble code that it is used only > > on Sphinx 1.4 and 1.5 to a separate if. On Sphinx 1.6, the macros there > > are silently ignored. While the conf.py becomes a little bit more complex, > > it clearly marks the backward-compatible code, with IMHO, it is a > > good idea, specially as some day, we may drop support for older Sphinx > > versions. > > > > None of those patches are mandatory. Feel free to apply any time you > > want (or discard them, if you don't thing it is worth). > > OK, these are applied (and the adjustbox one too). Thanks! > > PDF generation seems to work pretty well at the moment, with one > exception: I don't get a table of contents in any of the files (just a > blank page saying "Contents"). Are you seeing something different? That depends on the version. With Sphinx 1.4, the CONTENTS page is filled with a LaTeX 1-depth ToC (e. g. 2 levels). With Sphinx 1.6, the first time make pdfdocs is called, it doesn't produce a CONTENTS page. It does if it is called twice. I suspect that the difference here is that, with Sphinx up to version 1.5, the Makefile created under Documentation/output/latex calls xelatex several times: %.pdf: %.tex $(PDFLATEX) $(LATEXOPTS) '$<' $(PDFLATEX) $(LATEXOPTS) '$<' $(PDFLATEX) $(LATEXOPTS) '$<' -$(MAKEINDEX) -s python.ist '$(basename $<).idx' $(PDFLATEX) $(LATEXOPTS) '$<' $(PDFLATEX) $(LATEXOPTS) '$<' With Sphinx 1.6, it calls it only once: %.pdf: %.tex FORCE_MAKE $(PDFLATEX) $(LATEXMKOPTS) '$<' That seems another regression on Sphinx 1.6. Regards, Mauro