ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fwd: Re:  Stray blank page with part
       [not found] <86d61f5f-371b-3a6b-dc9e-9796cccfa80f@wxs.nl>
@ 2017-12-20 10:50 ` Hans Hagen
  2017-12-20 17:40   ` Aditya Mahajan
  2017-12-20 17:44   ` Aditya Mahajan
  0 siblings, 2 replies; 5+ messages in thread
From: Hans Hagen @ 2017-12-20 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users




-------- Forwarded Message --------
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen <pragma@wxs.nl>
To: Henri <henrimenke@gmail.com>

On 12/19/2017 9:15 PM, Henri wrote:
> 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
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.

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Re: Stray blank page with part
  2017-12-20 10:50 ` Fwd: Re: Stray blank page with part Hans Hagen
@ 2017-12-20 17:40   ` Aditya Mahajan
  2017-12-20 21:07     ` Hans Hagen
  2017-12-20 17:44   ` Aditya Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2017-12-20 17:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]

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 <pragma@wxs.nl>
> To: Henri <henrimenke@gmail.com>
>
> On 12/19/2017 9:15 PM, Henri wrote:
>>  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
> 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

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Re: Stray blank page with part
  2017-12-20 10:50 ` Fwd: Re: Stray blank page with part Hans Hagen
  2017-12-20 17:40   ` Aditya Mahajan
@ 2017-12-20 17:44   ` Aditya Mahajan
  2017-12-20 21:16     ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2017-12-20 17:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Re: Stray blank page with part
  2017-12-20 17:40   ` Aditya Mahajan
@ 2017-12-20 21:07     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2017-12-20 21:07 UTC (permalink / raw)
  To: ntg-context

On 12/20/2017 6:40 PM, Aditya Mahajan wrote:
> 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 <pragma@wxs.nl>
>> To: Henri <henrimenke@gmail.com>
>>
>> On 12/19/2017 9:15 PM, Henri wrote:
>>>  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
>> 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.
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Re: Stray blank page with part
  2017-12-20 17:44   ` Aditya Mahajan
@ 2017-12-20 21:16     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2017-12-20 21:16 UTC (permalink / raw)
  To: ntg-context

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.

that is actually more tricky as trying toi sync the page buildern (and 
spacing) is rather sensitive

> 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 
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-20 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <86d61f5f-371b-3a6b-dc9e-9796cccfa80f@wxs.nl>
2017-12-20 10:50 ` Fwd: Re: Stray blank page with part Hans Hagen
2017-12-20 17:40   ` Aditya Mahajan
2017-12-20 21:07     ` Hans Hagen
2017-12-20 17:44   ` Aditya Mahajan
2017-12-20 21:16     ` Hans Hagen

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 NNTP newsgroup(s).