From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [PATCH] Compiling multiple times the LaTeX output Date: Thu, 30 Sep 2010 11:39:05 -0400 Message-ID: <30671.1285861145@gamaville.dokosmarshall.org> References: <87zkv0pqyi.fsf@mundaneum.com> <87r5gcshnf.fsf@noorul.maa.corp.collab.net> <874od7uzsa.fsf_-_@mundaneum.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38556 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1LEF-0005xU-Kv for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1LE6-0007Kp-VA for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:39:27 -0400 Received: from vms173019pub.verizon.net ([206.46.173.19]:58093) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1LE6-0007Ki-S2 for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:39:18 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L9K00220GT5FX90@vms173019.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 10:39:07 -0500 (CDT) In-reply-to: Message from =?us-ascii?Q?=3D=3Futf-8=3FQ=3FS=3DC3=3DA9bastie?= =?us-ascii?Q?n=5FVauban=3F=3D?= of "Thu\, 30 Sep 2010 15\:27\:49 +0200." <874od7uzsa.fsf_-_@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?us-ascii?Q?=3D=3Futf-8=3FQ=3FS=3DC3=3DA9bastien=5FVauban=3F=3D?= Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org S=C3=A9bastien Vauban wrote: > Hi Noorul and all, >=20 > Noorul Islam K M wrote: > > S=C3=A9bastien Vauban writes: > >> I've been taught of a weird observation: the page number indicated in = the > >> TOC of a PDFLaTeX output is wrong by one page... > > > > Quoting from source code > > > > (defcustom org-latex-to-pdf-process > > '("pdflatex -interaction nonstopmode -output-directory %o %f" > > "pdflatex -interaction nonstopmode -output-directory %o %f") > > "Commands to process a LaTeX file to a PDF file. > > This is a list of strings, each of them will be given to the shell > > as a command. >=20 > Attached my proposed patch for fixing this, regarding the TOC error (need= ed a > third compilation). Here, as many compilations as necessary are run, up to > when LaTeX confirms the result is stable (no message "please re-run..."). >=20 I don't know if that's still the case, but there were (rare) situations whe= re that would *never* happen: LaTeX would oscillate between two different stat= es of output, so you always needed to do one more compilation. The only fix was to rearrange the *input* sligthly to try to get LaTeX out of its rut. It may be wise to limit the number of compilations to 3 (but perhaps make it configurable, so that it can be increased if necessary). Nick