* Controlling pagination on headings in Latex/PDF export?
@ 2012-02-16 17:45 Jos'h Fuller
2012-02-16 18:20 ` Nick Dokos
0 siblings, 1 reply; 21+ messages in thread
From: Jos'h Fuller @ 2012-02-16 17:45 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
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?
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.
Thanks very much!
_______________________________________________________________________________
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 |
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 17:45 Controlling pagination on headings in Latex/PDF export? Jos'h Fuller
@ 2012-02-16 18:20 ` Nick Dokos
2012-02-16 18:25 ` Jos'h Fuller
0 siblings, 1 reply; 21+ messages in thread
From: Nick Dokos @ 2012-02-16 18:20 UTC (permalink / raw)
To: Jos'h Fuller; +Cc: nicholas.dokos, emacs-orgmode@gnu.org
Jos'h Fuller <Jos'h.Fuller@arcproductions.com> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 18:20 ` Nick Dokos
@ 2012-02-16 18:25 ` Jos'h Fuller
2012-02-16 18:58 ` Russell Adams
2012-02-16 19:44 ` Sebastien Vauban
0 siblings, 2 replies; 21+ messages in thread
From: Jos'h Fuller @ 2012-02-16 18:25 UTC (permalink / raw)
To: nicholas.dokos@hp.com; +Cc: emacs-orgmode@gnu.org
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 <Jos'h.Fuller@arcproductions.com> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 18:25 ` Jos'h Fuller
@ 2012-02-16 18:58 ` Russell Adams
2012-02-16 19:44 ` Sebastien Vauban
1 sibling, 0 replies; 21+ messages in thread
From: Russell Adams @ 2012-02-16 18:58 UTC (permalink / raw)
To: emacs-orgmode
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 <Jos'h.Fuller@arcproductions.com> 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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 18:25 ` Jos'h Fuller
2012-02-16 18:58 ` Russell Adams
@ 2012-02-16 19:44 ` Sebastien Vauban
2012-02-16 20:09 ` Jos'h Fuller
1 sibling, 1 reply; 21+ messages in thread
From: Sebastien Vauban @ 2012-02-16 19:44 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Jos'h,
Jos'h Fuller wrote:
> 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...
I have written such a thing, years ago, first for LaTeX, now for Org:
--8<---------------cut here---------------start------------->8---
% how not to have a page break with what is following?
\def\mykeepwithnextpar{\par\nobreak\@afterheading}
--8<---------------cut here---------------end--------------->8---
and I put whereever it's needed
--8<---------------cut here---------------start------------->8---
** Asset
#+latex: \mykeepwithnextpar{}
*** DEPARTMENT A
| Table | Data | Here. |
| Table | Data | Here. |
| Table | Data | Here. |
*** DEPARTMENT B
--8<---------------cut here---------------end--------------->8---
Does it work for you?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 19:44 ` Sebastien Vauban
@ 2012-02-16 20:09 ` Jos'h Fuller
2012-02-16 20:16 ` Jos'h Fuller
0 siblings, 1 reply; 21+ messages in thread
From: Jos'h Fuller @ 2012-02-16 20:09 UTC (permalink / raw)
To: Sebastien Vauban, emacs-orgmode@gnu.org
Hi Sebastien!
I tried it, and it didn't work. However, I may not have set it up right:
--snip!--
#+latex \def\mykeepwithnextpar{\par\nobreak\@afterheading}
#+latex: \newpage
* Period...
** Asset
#+latex: \mykeepwithnextpar{}
*** DEPARTMENT
| Table | Data | Here |
--snip!--
Did I do this correctly or does the "mykeepwithnextpar" definition have to go into a different file?
Thanks very much!
_______________________________________________________________________________
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: emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org
> [mailto:emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org]
> On Behalf Of Sebastien Vauban
> Sent: Thursday, February 16, 2012 2:44 PM
> To: emacs-orgmode@gnu.org
> Subject: Re: [O] Controlling pagination on headings in Latex/PDF
> export?
>
> Hi Jos'h,
>
> Jos'h Fuller wrote:
> > 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...
>
> I have written such a thing, years ago, first for LaTeX, now for Org:
>
> --8<---------------cut here---------------start------------->8---
> % how not to have a page break with what is following?
> \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> --8<---------------cut here---------------end--------------->8---
>
> and I put whereever it's needed
>
> --8<---------------cut here---------------start------------->8---
> ** Asset
> #+latex: \mykeepwithnextpar{}
> *** DEPARTMENT A
> | Table | Data | Here. |
> | Table | Data | Here. |
> | Table | Data | Here. |
> *** DEPARTMENT B
> --8<---------------cut here---------------end--------------->8---
>
> Does it work for you?
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 20:09 ` Jos'h Fuller
@ 2012-02-16 20:16 ` Jos'h Fuller
2012-02-16 20:25 ` Sebastien Vauban
2012-02-16 21:12 ` Nick Dokos
0 siblings, 2 replies; 21+ messages in thread
From: Jos'h Fuller @ 2012-02-16 20:16 UTC (permalink / raw)
To: Jos'h Fuller, Sebastien Vauban, emacs-orgmode@gnu.org
OK, I'm an idiot. I forgot to put in the ":" after the "#+latex", so it didn't get processed correctly.
However, once I did put it in, it does work to keep the headings together with the table data. However... it also seems to embed the spurious word "afterheading" (in italics) after most (but not all) of the top level headings in the file.
So, it totally works to keep the headings and tables together, but the /afterheading/ thing is very strange.
I've probably still done something wrong. Any ideas?
Thanks again!
Jos'h
_______________________________________________________________________________
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: emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org
> [mailto:emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org]
> On Behalf Of Jos'h Fuller
> Sent: Thursday, February 16, 2012 3:09 PM
> To: Sebastien Vauban; emacs-orgmode@gnu.org
> Subject: Re: [O] Controlling pagination on headings in Latex/PDF
> export?
>
> Hi Sebastien!
>
> I tried it, and it didn't work. However, I may not have set it up
> right:
>
> --snip!--
> #+latex \def\mykeepwithnextpar{\par\nobreak\@afterheading}
>
> #+latex: \newpage
> * Period...
> ** Asset
> #+latex: \mykeepwithnextpar{}
> *** DEPARTMENT
> | Table | Data | Here |
> --snip!--
>
> Did I do this correctly or does the "mykeepwithnextpar" definition have
> to go into a different file?
>
> Thanks very much!
> _______________________________________________________________________
> ________
>
> 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: emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org
> > [mailto:emacs-orgmode-
> bounces+jos'h.fuller=arcproductions.com@gnu.org]
> > On Behalf Of Sebastien Vauban
> > Sent: Thursday, February 16, 2012 2:44 PM
> > To: emacs-orgmode@gnu.org
> > Subject: Re: [O] Controlling pagination on headings in Latex/PDF
> > export?
> >
> > Hi Jos'h,
> >
> > Jos'h Fuller wrote:
> > > 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...
> >
> > I have written such a thing, years ago, first for LaTeX, now for Org:
> >
> > --8<---------------cut here---------------start------------->8---
> > % how not to have a page break with what is following?
> > \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> > --8<---------------cut here---------------end--------------->8---
> >
> > and I put whereever it's needed
> >
> > --8<---------------cut here---------------start------------->8---
> > ** Asset
> > #+latex: \mykeepwithnextpar{}
> > *** DEPARTMENT A
> > | Table | Data | Here. |
> > | Table | Data | Here. |
> > | Table | Data | Here. |
> > *** DEPARTMENT B
> > --8<---------------cut here---------------end--------------->8---
> >
> > Does it work for you?
> >
> > Best regards,
> > Seb
> >
> > --
> > Sebastien Vauban
> >
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 20:16 ` Jos'h Fuller
@ 2012-02-16 20:25 ` Sebastien Vauban
2012-02-16 21:02 ` Nick Dokos
2012-02-16 21:12 ` Nick Dokos
1 sibling, 1 reply; 21+ messages in thread
From: Sebastien Vauban @ 2012-02-16 20:25 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Jos'h,
Jos'h Fuller wrote:
> OK, I'm an idiot. I forgot to put in the ":" after the "#+latex", so it
> didn't get processed correctly.
That happens to everybody... No need to be an idiot ;-)
> However, once I did put it in, it does work to keep the headings together with
> the table data. However... it also seems to embed the spurious word
> "afterheading" (in italics) after most (but not all) of the top level headings
> in the file.
>
> So, it totally works to keep the headings and tables together, but the
> /afterheading/ thing is very strange.
>
> I've probably still done something wrong. Any ideas?
Strange. Maybe, you could send here an ECM (Minimal Complete Example) that
shows the bug without the \mykeepwithnextpar and shows the afterheading
problem with it...
So that one can try to reproduce your problem without loosing too much time,
in order to help you better and quicker.
BTW, you should put \mykeepwithnextpar after the heading "DEPARTMENT A", not
before (as I wrote)...
>> > I have written such a thing, years ago, first for LaTeX, now for Org:
>> >
>> > --8<---------------cut here---------------start------------->8---
>> > % how not to have a page break with what is following?
>> > \def\mykeepwithnextpar{\par\nobreak\@afterheading}
>> > --8<---------------cut here---------------end--------------->8---
>> >
>> > and I put whereever it's needed
>> >
>> > --8<---------------cut here---------------start------------->8---
>> > ** Asset
>> > #+latex: \mykeepwithnextpar{}
>> > *** DEPARTMENT A
>> > | Table | Data | Here. |
>> > | Table | Data | Here. |
>> > | Table | Data | Here. |
>> > *** DEPARTMENT B
>> > --8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 20:25 ` Sebastien Vauban
@ 2012-02-16 21:02 ` Nick Dokos
2012-02-17 8:05 ` Stefan Nobis
2012-02-17 8:55 ` Sebastien Vauban
0 siblings, 2 replies; 21+ messages in thread
From: Nick Dokos @ 2012-02-16 21:02 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: nicholas.dokos, emacs-orgmode
Sebastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
> Jos'h,
>
> Jos'h Fuller wrote:
> > OK, I'm an idiot. I forgot to put in the ":" after the "#+latex", so it
> > didn't get processed correctly.
>
> That happens to everybody... No need to be an idiot ;-)
>
> > However, once I did put it in, it does work to keep the headings together with
> > the table data. However... it also seems to embed the spurious word
> > "afterheading" (in italics) after most (but not all) of the top level headings
> > in the file.
> >
> > So, it totally works to keep the headings and tables together, but the
> > /afterheading/ thing is very strange.
> >
> > I've probably still done something wrong. Any ideas?
>
> Strange. Maybe, you could send here an ECM (Minimal Complete Example) that
> shows the bug without the \mykeepwithnextpar and shows the afterheading
> problem with it...
>
> So that one can try to reproduce your problem without loosing too much time,
> in order to help you better and quicker.
>
> BTW, you should put \mykeepwithnextpar after the heading "DEPARTMENT A", not
> before (as I wrote)...
>
> >> > I have written such a thing, years ago, first for LaTeX, now for Org:
> >> >
> >> > --8<---------------cut here---------------start------------->8---
> >> > % how not to have a page break with what is following?
> >> > \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> >> > --8<---------------cut here---------------end--------------->8---
> >> >
> >> > and I put whereever it's needed
> >> >
> >> > --8<---------------cut here---------------start------------->8---
> >> > ** Asset
> >> > #+latex: \mykeepwithnextpar{}
> >> > *** DEPARTMENT A
> >> > | Table | Data | Here. |
> >> > | Table | Data | Here. |
> >> > | Table | Data | Here. |
> >> > *** DEPARTMENT B
> >> > --8<---------------cut here---------------end--------------->8---
>
@ is a character that is reserved for .sty files: it's basically used as
a mechanism to manufacture private names that are not going to conflict
with other names. If you want to use @ in a macro in your .tex file,
then you have to do something like this:
#+LaTeX_HEADER: \makeatletter
#+LaTeX_HEADER: \def\mykeepwithnextpar{\par\nobreak\@afterheading}
#+LaTeX_HEADER: \makeatother
However the best thing is to put the definition in a .sty file:
--8<---------------keeper.sty---------------start------------->8---
\def\mykeepwithnextpar{\par\nobreak\@afterheading}
--8<---------------keeper.sty---------------end--------------->8---
and then use
--8<---------------cut here---------------start------------->8---
#+LaTeX_HEADER: \usepackage{keeper}
--8<---------------cut here---------------end--------------->8---
in your .org file.
However, I find it exceedingly difficult to manufacture an example that
will produce the bad break that the OP reports: LaTeX seems very
reluctant to break after the headline. E.g. in the appended file, I can
vary the number of foo lines from 0 to enough to fill the page and I
cannot split the DEPARTMENT headline from the table. I also tried
various lengths for the table (not very systematically, I must admit)
and I still cannot get the default settings to misbehave. This leads me
to believe that there are those "other" factors that affect badness:
LaTeX thinks that there is something so severely out of whack in the
"other" factors that it is willing to make the supreme sacrifice of
splitting the headline from the table.
So if the OP can provide a misbehaving example, that could help clarify
things.
Nick
PS. Note that the call to \mykeewithnextpar is disabled in the file
below. If I enable it, I actually get a foo line at the top of the
second page before the DEPARTMENT headline, so it certainly affects
the output, but not in a good way.
--8<---------------cut here---------------start------------->8---
#+LaTeX_HEADER: \usepackage{keeper}
* Period 2012-02-06 to 2012-02-12
** Asset
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
##+LATEX: \mykeepwithnextpar{}
*** DEPARTMENT
| Data | Data | Data | Data |
|-------------+------+------+------|
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
| XXXXXX | 1 | 1 | 0 |
| YYYYYY | 5 | 4 | 0 |
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 20:16 ` Jos'h Fuller
2012-02-16 20:25 ` Sebastien Vauban
@ 2012-02-16 21:12 ` Nick Dokos
2012-02-16 23:12 ` Jos'h Fuller
1 sibling, 1 reply; 21+ messages in thread
From: Nick Dokos @ 2012-02-16 21:12 UTC (permalink / raw)
To: Jos'h Fuller; +Cc: Sebastien Vauban, nicholas.dokos, emacs-orgmode@gnu.org
Jos'h Fuller <Jos'h.Fuller@arcproductions.com> wrote:
> OK, I'm an idiot. I forgot to put in the ":" after the "#+latex", so
> it didn't get processed correctly.
Indeed, I've *never* made such an idiotic mistake (well, at least not since
yesterday) - how could you? :-)
OTOH, I tend to forget the + routinely, but you know what they say: to
each his own blind spot.
On a more serious note, things that need to end up in the preamble should
be marked
#+LaTeX_HEADER: \def\mykeepwithnextpar{\par\nobreak\@afterheading}
(and note my other post about @).
The
#+LATEX: \foo
markup is for things that end up in the document environment.
Nick
>
> However, once I did put it in, it does work to keep the headings together with the table data. However... it also seems to embed the spurious word "afterheading" (in italics) after most (but not all) of the top level headings in the file.
>
> So, it totally works to keep the headings and tables together, but the /afterheading/ thing is very strange.
>
> I've probably still done something wrong. Any ideas?
>
> Thanks again!
>
> Jos'h
> _______________________________________________________________________________
>
> 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: emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org
> > [mailto:emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org]
> > On Behalf Of Jos'h Fuller
> > Sent: Thursday, February 16, 2012 3:09 PM
> > To: Sebastien Vauban; emacs-orgmode@gnu.org
> > Subject: Re: [O] Controlling pagination on headings in Latex/PDF
> > export?
> >
> > Hi Sebastien!
> >
> > I tried it, and it didn't work. However, I may not have set it up
> > right:
> >
> > --snip!--
> > #+latex \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> >
> > #+latex: \newpage
> > * Period...
> > ** Asset
> > #+latex: \mykeepwithnextpar{}
> > *** DEPARTMENT
> > | Table | Data | Here |
> > --snip!--
> >
> > Did I do this correctly or does the "mykeepwithnextpar" definition have
> > to go into a different file?
> >
> > Thanks very much!
> > _______________________________________________________________________
> > ________
> >
> > 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: emacs-orgmode-bounces+jos'h.fuller=arcproductions.com@gnu.org
> > > [mailto:emacs-orgmode-
> > bounces+jos'h.fuller=arcproductions.com@gnu.org]
> > > On Behalf Of Sebastien Vauban
> > > Sent: Thursday, February 16, 2012 2:44 PM
> > > To: emacs-orgmode@gnu.org
> > > Subject: Re: [O] Controlling pagination on headings in Latex/PDF
> > > export?
> > >
> > > Hi Jos'h,
> > >
> > > Jos'h Fuller wrote:
> > > > 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...
> > >
> > > I have written such a thing, years ago, first for LaTeX, now for Org:
> > >
> > > --8<---------------cut here---------------start------------->8---
> > > % how not to have a page break with what is following?
> > > \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> > > --8<---------------cut here---------------end--------------->8---
> > >
> > > and I put whereever it's needed
> > >
> > > --8<---------------cut here---------------start------------->8---
> > > ** Asset
> > > #+latex: \mykeepwithnextpar{}
> > > *** DEPARTMENT A
> > > | Table | Data | Here. |
> > > | Table | Data | Here. |
> > > | Table | Data | Here. |
> > > *** DEPARTMENT B
> > > --8<---------------cut here---------------end--------------->8---
> > >
> > > Does it work for you?
> > >
> > > Best regards,
> > > Seb
> > >
> > > --
> > > Sebastien Vauban
> > >
> >
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 21:12 ` Nick Dokos
@ 2012-02-16 23:12 ` Jos'h Fuller
2012-02-17 8:50 ` Stefan Nobis
2012-02-17 9:09 ` Stefan Nobis
0 siblings, 2 replies; 21+ messages in thread
From: Jos'h Fuller @ 2012-02-16 23:12 UTC (permalink / raw)
To: nicholas.dokos@hp.com; +Cc: Sebastien Vauban, emacs-orgmode@gnu.org
Hi!
Thanks for your kind words! ; - )
I did wrap the "mykeepwithnextpar" definition and I moved the call between the heading and the table as suggested, but it still doesn't seem to want to cooperate (heading on one page, table on the next).
Since this seems to be strange behaviour, I will set up a minimal failing %.org file and send it tomorrow to demonstrate the problem.
Thanks again!
Jos'h
_______________________________________________________________________________
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 |
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 21:02 ` Nick Dokos
@ 2012-02-17 8:05 ` Stefan Nobis
2012-02-17 8:13 ` Ian Barton
2012-02-17 8:55 ` Sebastien Vauban
1 sibling, 1 reply; 21+ messages in thread
From: Stefan Nobis @ 2012-02-17 8:05 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Sebastien Vauban, emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> However, I find it exceedingly difficult to manufacture an example
> that will produce the bad break that the OP reports: LaTeX seems
> very reluctant to break after the headline.
Yes. That's because the above snippet is already part of the
definition of a section (from chapter down to paragraph). IIRC it's
defined in the latex kernel. Therefore it should not make any
difference if the command is only used directly after a sectioning
command.
One way to ensure that some part of the document is always seen as a
single entity by latex is to put it in a minipage (maybe there are
better options, but that's my fallback if I need to ensure that
something is always kept together).
--
Until the next mail...,
Stefan.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 8:05 ` Stefan Nobis
@ 2012-02-17 8:13 ` Ian Barton
0 siblings, 0 replies; 21+ messages in thread
From: Ian Barton @ 2012-02-17 8:13 UTC (permalink / raw)
To: emacs-orgmode
On 17/02/12 08:05, Stefan Nobis wrote:
> Nick Dokos<nicholas.dokos@hp.com> writes:
>
>> \def\mykeepwithnextpar{\par\nobreak\@afterheading}
>
>> However, I find it exceedingly difficult to manufacture an example
>> that will produce the bad break that the OP reports: LaTeX seems
>> very reluctant to break after the headline.
>
I am just starting to use Latex, so apologies for any noobish blunders:)
In conventional typesetting this problem is referred to as "Widows and
Orphans". There is a bit in the FAQ at
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=widows which might offer
some additional help.
Ian.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 23:12 ` Jos'h Fuller
@ 2012-02-17 8:50 ` Stefan Nobis
2012-02-17 9:09 ` Stefan Nobis
1 sibling, 0 replies; 21+ messages in thread
From: Stefan Nobis @ 2012-02-17 8:50 UTC (permalink / raw)
To: Jos'h Fuller
Cc: Sebastien Vauban, nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Jos'h Fuller <Jos'h.Fuller@arcproductions.com> writes:
> but it still doesn't seem to want to cooperate (heading on one page,
> table on the next).
Reading this again, another hint: If the table is exported to tabular
and wrapped in a figure environment, then that might be the
problem. I'm not familiar with org-modes latex export. But if you show
me the resulting LaTeX code, maybe I could help on the LaTeX side.
--
Until the next mail...,
Stefan.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 21:02 ` Nick Dokos
2012-02-17 8:05 ` Stefan Nobis
@ 2012-02-17 8:55 ` Sebastien Vauban
2012-02-17 16:40 ` Nick Dokos
1 sibling, 1 reply; 21+ messages in thread
From: Sebastien Vauban @ 2012-02-17 8:55 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Nick,
Nick Dokos wrote:
> @ is a character that is reserved for .sty files: it's basically used as
> a mechanism to manufacture private names that are not going to conflict
> with other names. If you want to use @ in a macro in your .tex file,
> then you have to do something like this:
>
> #+LaTeX_HEADER: \makeatletter
> #+LaTeX_HEADER: \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> #+LaTeX_HEADER: \makeatother
>
> However the best thing is to put the definition in a .sty file:
>
> --8<---------------keeper.sty---------------start------------->8---
> \def\mykeepwithnextpar{\par\nobreak\@afterheading}
> --8<---------------keeper.sty---------------end--------------->8---
>
> and then use
>
> #+LaTeX_HEADER: \usepackage{keeper}
>
> in your .org file.
In my case, yes, that's in a style file... reason allowing me to forget to
mention the makeatletter thingie.
> However, I find it exceedingly difficult to manufacture an example that
> will produce the bad break that the OP reports: LaTeX seems very
> reluctant to break after the headline. E.g. in the appended file, I can
> vary the number of foo lines from 0 to enough to fill the page and I
> cannot split the DEPARTMENT headline from the table. I also tried
> various lengths for the table (not very systematically, I must admit)
> and I still cannot get the default settings to misbehave. This leads me
> to believe that there are those "other" factors that affect badness:
> LaTeX thinks that there is something so severely out of whack in the
> "other" factors that it is willing to make the supreme sacrifice of
> splitting the headline from the table.
>
> So if the OP can provide a misbehaving example, that could help clarify
> things.
>
> Nick
>
> PS. Note that the call to \mykeewithnextpar is disabled in the file
> below. If I enable it, I actually get a foo line at the top of the
> second page before the DEPARTMENT headline, so it certainly affects
> the output, but not in a good way.
You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it
must be between the two things you want to see glue'd together.
Hence, in the example you mention, it works perfectly.
For answering the OP's question, the call must be moved between the DEPARTMENT
title and the table...
> #+LaTeX_HEADER: \usepackage{keeper}
>
> * Period 2012-02-06 to 2012-02-12
> ** Asset
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foofoo foo foo foo foo foo
> ##+LATEX: \mykeepwithnextpar{}
> *** DEPARTMENT
> | Data | Data | Data | Data |
> |-------------+------+------+------|
> | XXXXXX | 1 | 1 | 0 |
> | YYYYYY | 5 | 4 | 0 |
> | XXXXXX | 1 | 1 | 0 |
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-16 23:12 ` Jos'h Fuller
2012-02-17 8:50 ` Stefan Nobis
@ 2012-02-17 9:09 ` Stefan Nobis
2012-02-17 16:42 ` Nick Dokos
1 sibling, 1 reply; 21+ messages in thread
From: Stefan Nobis @ 2012-02-17 9:09 UTC (permalink / raw)
To: emacs-orgmode
Jos'h Fuller <Jos'h.Fuller@arcproductions.com> writes:
> Hi!
> Thanks for your kind words! ; - )
> I did wrap the "mykeepwithnextpar" definition and I moved the call between the heading
> and the table as suggested, but it still doesn't seem to want to cooperate (heading on
> one page, table on the next).
I just tried to export the example posted by Nick. The tabluar is
wrapped in a center environment. I think this is the problem. Without
the help of something like the minipage environment I think it is
impossible to prevent page breaks before the centered object in the
general case (the problem is not the centering but the environment
"center" is implemented with the help of a list environment and IIRC
lists allow page breaks around them).
As I'm not a LaTeX expert it may be helpful to ask on comp.text.tex
for some tipps.
--
Until the next mail...,
Stefan.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 8:55 ` Sebastien Vauban
@ 2012-02-17 16:40 ` Nick Dokos
2012-02-17 16:50 ` Sebastien Vauban
0 siblings, 1 reply; 21+ messages in thread
From: Nick Dokos @ 2012-02-17 16:40 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: nicholas.dokos, emacs-orgmode
Sebastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
> You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it
> must be between the two things you want to see glue'd together.
>
> Hence, in the example you mention, it works perfectly.
>
No, that's not what I'm talking about: I'm not using your mechanism at
all (note the disabling ## in front). What I'm saying is that I find it
exceedingly difficult to reproduce the behavior the OP reported at all:
no tricks, just export to LaTeX and process. That's why I wanted to see
an example of the input file.
My contention is that LaTeX is pretty good at keeping things together
that should be together, so the misbehavior indicates some *other* kind
of problem: e.g. there is a fairly well known problem that causes all of
the figures to end up at the end of the chapter, because the constraints
imposed by the user make it impossible to DTRT.
Nick
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 9:09 ` Stefan Nobis
@ 2012-02-17 16:42 ` Nick Dokos
0 siblings, 0 replies; 21+ messages in thread
From: Nick Dokos @ 2012-02-17 16:42 UTC (permalink / raw)
To: Stefan Nobis; +Cc: nicholas.dokos, emacs-orgmode
Stefan Nobis <stefan-ml@snobis.de> wrote:
> Jos'h Fuller <Jos'h.Fuller@arcproductions.com> writes:
>
> > Hi!
>
> > Thanks for your kind words! ; - )
>
> > I did wrap the "mykeepwithnextpar" definition and I moved the call between the heading
> > and the table as suggested, but it still doesn't seem to want to cooperate (heading on
> > one page, table on the next).
>
> I just tried to export the example posted by Nick. The tabluar is
> wrapped in a center environment. I think this is the problem. Without
> the help of something like the minipage environment I think it is
> impossible to prevent page breaks before the centered object in the
> general case (the problem is not the centering but the environment
> "center" is implemented with the help of a list environment and IIRC
> lists allow page breaks around them).
>
> As I'm not a LaTeX expert it may be helpful to ask on comp.text.tex
> for some tipps.
>
But there is still a LARGE penalty for breaking there: it's not
impossible to produce but it *is* hard. I agree with you that we are not
going to solve it until we see an example input file that reproduces the
problem.
Nick
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 16:40 ` Nick Dokos
@ 2012-02-17 16:50 ` Sebastien Vauban
2012-02-17 17:19 ` Nick Dokos
0 siblings, 1 reply; 21+ messages in thread
From: Sebastien Vauban @ 2012-02-17 16:50 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Nick,
Nick Dokos wrote:
> Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> wrote:
>
>> You cannot reproduce it, because I misplaced the call to mykeewithnextpar: it
>> must be between the two things you want to see glue'd together.
>>
>> Hence, in the example you mention, it works perfectly.
>
> No, that's not what I'm talking about: I'm not using your mechanism at
> all (note the disabling ## in front). What I'm saying is that I find it
> exceedingly difficult to reproduce the behavior the OP reported at all:
> no tricks, just export to LaTeX and process. That's why I wanted to see
> an example of the input file.
OK. Sorry for misreading...
> My contention is that LaTeX is pretty good at keeping things together
> that should be together, so the misbehavior indicates some *other* kind
> of problem: e.g. there is a fairly well known problem that causes all of
> the figures to end up at the end of the chapter, because the constraints
> imposed by the user make it impossible to DTRT.
Things that can easily make LaTeX become crazy is changing the color of the
titles. In such a case, LaTeX will allow much more easily to break after the
title, even if at bottom of page, as changing color somehow affects penalty.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 16:50 ` Sebastien Vauban
@ 2012-02-17 17:19 ` Nick Dokos
2012-02-17 21:48 ` Sebastien Vauban
0 siblings, 1 reply; 21+ messages in thread
From: Nick Dokos @ 2012-02-17 17:19 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: nicholas.dokos, emacs-orgmode
Sebastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
> Things that can easily make LaTeX become crazy is changing the color of the
> titles. In such a case, LaTeX will allow much more easily to break after the
> title, even if at bottom of page, as changing color somehow affects penalty.
>
Never heard of that one (but I haven't been on comp.text.tex for many
years now): do you have a reference to the problem somewhere?
Thanks,
Nick
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Controlling pagination on headings in Latex/PDF export?
2012-02-17 17:19 ` Nick Dokos
@ 2012-02-17 21:48 ` Sebastien Vauban
0 siblings, 0 replies; 21+ messages in thread
From: Sebastien Vauban @ 2012-02-17 21:48 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Nick,
Nick Dokos wrote:
> Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> wrote:
>
>> Things that can easily make LaTeX become crazy is changing the color of the
>> titles. In such a case, LaTeX will allow much more easily to break after the
>> title, even if at bottom of page, as changing color somehow affects penalty.
>
> Never heard of that one (but I haven't been on comp.text.tex for many
> years now): do you have a reference to the problem somewhere?
You've made me work like our Thomas: I've made some archeology to find back
the answer given by Ulrike Fischer (on 09/22... 2008, 14:57) to one of my
questions (on FCTT, the French Tex related newsgroup):
Le saut de page vient probablement de \color qui insere un breakpoint.
http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics%2F3417
Tu peux essayer \color{blue}\nobreak.
Translation:
The page break probably comes from \color which inserts a breakpoint.
http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics%2F3417
You can try \color{blue}\nobreak.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-02-17 21:48 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 17:45 Controlling pagination on headings in Latex/PDF export? Jos'h Fuller
2012-02-16 18:20 ` Nick Dokos
2012-02-16 18:25 ` Jos'h Fuller
2012-02-16 18:58 ` Russell Adams
2012-02-16 19:44 ` Sebastien Vauban
2012-02-16 20:09 ` Jos'h Fuller
2012-02-16 20:16 ` Jos'h Fuller
2012-02-16 20:25 ` Sebastien Vauban
2012-02-16 21:02 ` Nick Dokos
2012-02-17 8:05 ` Stefan Nobis
2012-02-17 8:13 ` Ian Barton
2012-02-17 8:55 ` Sebastien Vauban
2012-02-17 16:40 ` Nick Dokos
2012-02-17 16:50 ` Sebastien Vauban
2012-02-17 17:19 ` Nick Dokos
2012-02-17 21:48 ` Sebastien Vauban
2012-02-16 21:12 ` Nick Dokos
2012-02-16 23:12 ` Jos'h Fuller
2012-02-17 8:50 ` Stefan Nobis
2012-02-17 9:09 ` Stefan Nobis
2012-02-17 16:42 ` Nick Dokos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).