From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Controlling pagination on headings in Latex/PDF export? Date: Thu, 16 Feb 2012 13:20:54 -0500 Message-ID: <16733.1329416454@alphaville> References: <44B0EAE8544C834188E8790873CDE1CC3E11EA@ARCEXCHANGE.arc.local> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry5xD-0000W2-LE for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:21:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ry5x9-0004Ru-1d for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:21:15 -0500 Received: from g1t0028.austin.hp.com ([15.216.28.35]:22102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry5x8-0004Q7-OZ for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 13:21:10 -0500 In-Reply-To: Message from Jos'h Fuller of "Thu, 16 Feb 2012 17:45:09 GMT." <44B0EAE8544C834188E8790873CDE1CC3E11EA@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: Jos'h Fuller Cc: nicholas.dokos@hp.com, "emacs-orgmode@gnu.org" 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