Fwd: Re: Stray blank page with part
Dear list,
Motivated by https://tex.stackexchange.com/questions/406892 I wanted to disable page breaks for parts. This works on all pages, except the first page of a document. Why? MWE is below as always. Reproducible with TL 2017 and latest beta.
Cheers, Henri
\setuphead [part] [page=no]
\starttext
\startpart[title=Part One] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart
\startpart[title=Part Two] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart
\stoptext
-------- Forwarded Message --------
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen
On Wed, 20 Dec 2017, Hans Hagen wrote:
-------- Forwarded Message -------- Subject: Re: [NTG-context] Stray blank page with part Date: Wed, 20 Dec 2017 11:50:11 +0100 From: Hans Hagen
To: Henri Dear list,
Motivated by https://tex.stackexchange.com/questions/406892 I wanted to disable page breaks for parts. This works on all pages, except the first page of a document. Why? MWE is below as always. Reproducible with TL 2017 and latest beta.
Cheers, Henri
\setuphead [part] [page=no]
\starttext
\startpart[title=Part One] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart \startpart[title=Part Two] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart
\stoptext
On 12/19/2017 9:15 PM, Henri wrote: this relates to the fatc that there has to be some node on the page that registers the part information and as chapter flushes a page that one ends up on a page then
% solution 1:
\setuphead [part] [page=no, placehead=hidden]
\setuptexttexts [\synchronizehead{part}]
% solution 2:
\setuphead [part] [page=no, placehead=hidden]
\appendtoks \synchronizehead{part}% \to \everybeforepagebody
% solution 3 (new in beta):
\setuphead [part] [placehead=section]
This will delay the flush till the next section head gets place. It's still not 100% predictable but it might work out ok in most cases.
Another option, that I posted on Tex.se is: \setuphead[chapter][continue=no] So that the page is not flushed by \startchapter immediate after a \startpart. Aditya
On Wed, 20 Dec 2017, Hans Hagen wrote:
-------- Forwarded Message -------- Subject: Re: [NTG-context] Stray blank page with part Date: Wed, 20 Dec 2017 11:50:11 +0100 From: Hans Hagen
To: Henri Dear list,
Motivated by https://tex.stackexchange.com/questions/406892 I wanted to disable page breaks for parts. This works on all pages, except the first page of a document. Why? MWE is below as always. Reproducible with TL 2017 and latest beta.
Cheers, Henri
\setuphead [part] [page=no]
\starttext
\startpart[title=Part One] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart \startpart[title=Part Two] \startchapter[title=Chapter One] \stopchapter \startchapter[title=Chapter Two] \stopchapter \stoppart
\stoptext
On 12/19/2017 9:15 PM, Henri wrote: this relates to the fatc that there has to be some node on the page that registers the part information and as chapter flushes a page that one ends up on a page then
% solution 1:
\setuphead [part] [page=no, placehead=hidden]
\setuptexttexts [\synchronizehead{part}]
% solution 2:
\setuphead [part] [page=no, placehead=hidden]
\appendtoks \synchronizehead{part}% \to \everybeforepagebody
% solution 3 (new in beta):
\setuphead [part] [placehead=section]
This will delay the flush till the next section head gets place. It's still not 100% predictable but it might work out ok in most cases.
Another option, that I posted on Tex.se is:
\setuphead[chapter][continue=no]
So that the page is not flushed by \startchapter immediate after a \startpart.
On 12/20/2017 6:40 PM, Aditya Mahajan wrote: there is still a (potentially) interfering node then (which can then be seen from the chapter line starting lower) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 20 Dec 2017, Hans Hagen wrote:
% solution 1:
\setuphead [part] [page=no, placehead=hidden]
\setuptexttexts [\synchronizehead{part}]
I recently had a problem where \testpage was misbehaving while \testpagesyncronized worked correctly. The example above is another situation where syncronization solves the problem. Does syncronization have any drawbacks (other than speed)? If not, then what is the overhead of "synchronizing everything"? ConTeXt is quite fast, and I for one, wouldn't mind a few mili second delay in each compilation for saving a few hours of debugging time! Aditya
On 12/20/2017 6:44 PM, Aditya Mahajan wrote:
On Wed, 20 Dec 2017, Hans Hagen wrote:
% solution 1:
\setuphead [part] [page=no, placehead=hidden]
\setuptexttexts [\synchronizehead{part}]
I recently had a problem where \testpage was misbehaving while \testpagesyncronized worked correctly. The example above is another situation where syncronization solves the problem.
Does syncronization have any drawbacks (other than speed)? If not, then what is the overhead of "synchronizing everything"? ConTeXt is quite fast, and I for one, wouldn't mind a few mili second delay in each compilation for saving a few hours of debugging time! normally i can deal with the speed (in this case it's probably not measurable) and normally i manage to add features without much of a
that is actually more tricky as trying toi sync the page buildern (and spacing) is rather sensitive penalty (of course sometimes it can mean hours of programming and testing) ... speaking of speed, probably no one notices when context becomes faster (mkiv definitely has not become slower over the years) unless the fact that no one complains is a good sign concerning syncing each time ... i can think of it but it needs an extra set of state variables per head then (and probbaly a way to turn that trickery off) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Aditya Mahajan
-
Hans Hagen