From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: Not getting a page break in the ToC
Date: Tue, 22 Aug 2023 09:29:45 +0200 [thread overview]
Message-ID: <5d860021-52b2-e4be-b1ea-121b2fc4b115@freedom.nl> (raw)
In-Reply-To: <CAGhDZhAtxiz7PRT-i6qmJ0NvaMYMLh=g-ApFvKsBRvrRB4dJ3g@mail.gmail.com>
On 8/22/2023 8:51 AM, Andres Conrado Montoya wrote:
> Apologies, I just found the solution:
> https://wiki.contextgarden.net/Command/setinjector
>
> El lun, 21 ago 2023 a las 23:43, Andres Conrado Montoya (<
> andresconrado@gmail.com>) escribió:
>
>> I'm trying to force a page break in a table of contents, using what is
>> recommended at
>> https://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break
>>
>> However, it does not work. Here's a MWE:
>>
>> \definelistextra[page][before=\page]
>> \starttext
>> \starttitle[title={Table of contents}]
>> \placecontent[extras={2=page}]
>> \stoptitle
>> \startchapter[title={First chapter}]
>> \input knuth
>> \stopchapter
>> \startchapter[title={Second chapter}]
>> \input knuth
>> \stopchapter
>> \startchapter[title={Third chapter}]
>> \input knuth
>> \stopchapter
>> \stoptext
>>
>> Is there a new way of obtaining a page break before a given part, chapter
>> or section in the ToC?
Here is another method:
\showpageprogress % [all]
%resetforcedbreak
\starttext
\registerforcedbreak[8][before]
\dorecurse{10}{\samplefile{tufte}\par}
\page
\resetforcedbreak
\registerforcedbreak[12][after]
\dorecurse{10}{\samplefile{tufte}\par}
\stoptext
(by-product of some new mechanisms that we are exploring)
(not yet wikified)
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2023-08-22 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 4:43 [NTG-context] " Andres Conrado Montoya
2023-08-22 6:51 ` [NTG-context] " Andres Conrado Montoya
2023-08-22 7:29 ` Hans Hagen via ntg-context [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d860021-52b2-e4be-b1ea-121b2fc4b115@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).