From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell Adams Subject: Re: Controlling pagination on headings in Latex/PDF export? Date: Thu, 16 Feb 2012 12:58:40 -0600 Message-ID: <20120216185840.GH3137@x201> References: <44B0EAE8544C834188E8790873CDE1CC3E11EA@ARCEXCHANGE.arc.local> <16733.1329416454@alphaville> <44B0EAE8544C834188E8790873CDE1CC3E154C@ARCEXCHANGE.arc.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry6XQ-0000XP-Ao for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:58:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ry6XL-0002uo-DJ for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:58:40 -0500 Received: from jack.asmallorange.com ([74.52.119.82]:43428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry6XL-0002uO-8c for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:58:35 -0500 Received: from 206.180.155.43.adsl.hal-pc.org ([206.180.155.43] helo=localhost) by jack.asmallorange.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1Ry6XF-002YRC-UU for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:58:30 -0500 Content-Disposition: inline In-Reply-To: <44B0EAE8544C834188E8790873CDE1CC3E154C@ARCEXCHANGE.arc.local> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I often use newpage myself, and have wondered if there were a way to ensure every first level (maybe second level too?) always had an automatic newpage before it. On Thu, Feb 16, 2012 at 06:25:40PM +0000, Jos'h Fuller wrote: > Hi! > > I am familiar with \newpage (and I especially like to put it at the front of the document to keep my content out of my table of contents!), but I was hoping to be able to do this in some more automatic fashion, since these are long reports and I want to be able to process them unattended. > > Is it possible to do something like this: > > * Period... > ** Asset > #+latex: \keepthisstufftogether{begin} > *** DEPARTMENT A > | Table | Data | Here. | > | Table | Data | Here. | > | Table | Data | Here. | > #+latex: \keepthisstufftogether{end} > *** DEPARTMENT B > ... > > I have no idea what /actual/ LaTeX call fills in for "\keepthisstufftogether" though... > > Thanks! > > _______________________________________________________________________________ > > Jos'h Fuller, Production Programmer > > Arc Productions Ltd. > > p: 416.682.5237 | f: 416.682.5209 | http://www.arcproductions.com > 230 Richmond Street East | Toronto, ON M5A 1P4 | > > > > -----Original Message----- > > From: nicholas.dokos@hp.com [mailto:nicholas.dokos@hp.com] > > Sent: Thursday, February 16, 2012 1:21 PM > > To: Jos'h Fuller > > Cc: emacs-orgmode@gnu.org; nicholas.dokos@hp.com > > Subject: Re: [O] Controlling pagination on headings in Latex/PDF > > export? > > > > Jos'h Fuller wrote: > > > > > Hi! > > > > > > I'm have an org-mode document something like this: > > > > > > * Period 2012-02-06 to 2012-02-12 > > > ** Asset > > > *** DEPARTMENT > > > | Data | Data | Data | Data | > > > |-------------+------+------+------| > > > | XXXXXX | 1 | 1 | 0 | > > > | YYYYYY | 5 | 4 | 0 | > > > > > > (There are more "Assets", each with several DEPARTMENTS. The tables > > are short, perhaps 10-15 rows.) > > > > > > When I go to export a PDF, I will often get "DEPARTMENT" at the > > bottom of one page, with the actual data table at the start of the > > next. Is there any way to keep the heading together with the table? > > > > > > > Try adding > > > > #+LATEX: \newpage > > > > before the heading where you want the page break to occur: > > > > --8<---------------cut here---------------start------------->8--- > > Period 2012-02-06 to 2012-02-12 > > ** Asset > > #+LATEX: \newpage > > *** DEPARTMENT > > | Data | Data | Data | Data | > > |-------------+------+------+------| > > | XXXXXX | 1 | 1 | 0 | > > | YYYYYY | 5 | 4 | 0 | > > > > --8<---------------cut here---------------end--------------->8--- > > > > You should probably do that as a last resort in the last editing > > round, just to fix problematic spots. > > > > > I tried using the longtable environment, but that just splits the > > > table itself, so that I might have the heading at the bottom of the > > > page with one row of the table and a continued message. I also tried > > > the LaTeX directives \goodbreak before the headings and \nobreak > > > between the headings and tables but they didn't seem to affect > > > anything. > > > > > > > IIRC, these influence LaTeX's internal measures of whether this is a > > good or bad place to do it, but there are several factors in > > competition > > and they probably lose in comparison to the other factors. > > > > \newpage otoh is Thor's hammer: no questions asked. > > > > Nick > ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3