[NTG-context] insert pagebreak in toc (MkIV)

Robert Blackstone blackstone.robert at gmail.com
Mon Sep 5 14:50:49 CEST 2016


On 5 Sep 2016, at 11:06 ,  Hans Hagen <pragma at wxs.nl> wrote
> 
> On 9/5/2016 9:06 AM, Robert Blackstone wrote:
>> 
>> I need a pagebreak in the ToC to avoid a widow.
>> So far I used the method given in sept 2010 in https://mailman.ntg.nl/pipermail/ntg-context/2010/052739.html, and
>> still on http://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break,  but
>> it does not seem to work anymore.
>> 
>> MWE (from the first-mentioned site):
>> %%%%%%%%%%%%%%%
>> 
>> \definelistextra[page][before=\page,after=\page]
>> 
>> \starttext
>> 
>>     \placelist[chapter,section][criterium=text,extras={1.1=page}]
>> 
>>     \chapter{x1}
>>     \section{xx1}
>>     \section{xx2}
>>     \chapter{y2}
>>     \section{yy1}
>>     \section{yy2}
>> 
>> \stoptext
>> 
>> %%%%%%%%%%%%%%%%%
>> Compiled with a recent mkiv, from between sept 2015 till july 2016, the
>> result shows no page break in the ToC.
>> What can be done about this?
> 
> \showinjector
> 
> \setinjector[register][3][\column]
> \setinjector[list]    [2][{\blank[3*big]}]
> 
> \starttext
>     \placelist[section][criterium=text]
>     \blank[3*big]
>     \placeregister[index][criterium=text]
>     \page
>     \startsection[title=Alpha] first  \index{first}  \stopsection
>     \startsection[title=Beta]  second \index{second} \stopsection
>     \startsection[title=Gamma] third  \index{third}  \stopsection
>     \startsection[title=Delta] fourth \index{fourth} \stopsection
> \stoptext

Thanks Hans, for your quick reaction.

Maybe my question was not clear enough but in any case your remedy does not help me.
I have adapted your MWE containing the remedy a bit to make the problem a bit more obvious:

%%%%%%%%%%%%%%%%%%
\setinjector[register][3][\column]
\setinjector[list]    [][{\blank[3*big]}]

\starttext
    \placelist[chapter,section][criterium=text]
    \blank[3*big]
	\startchapter[title={Introduction}]
     	\startsection[title=Alpha]  \index{first}  \stopsection
    	\startsection[title=Beta]  second \index{second} \stopsection \stopchapter
    	\startchapter[title={History}]
    	\startsection[title=Gamma] third  \index{third}  \stopsection
    	\startsection[title=Delta] fourth \index{fourth} \stopsection \stopchapter
    	\startchapter[title={Index}]
     	\placeregister[index][criterium=text]
     	\stopchapter
\stoptext
%%%%%%%%%%%%%%%%
What I would need is a forced page break in the ToC, in this example before Chapter 2.
A few months ago this could still be accomplished by inserting into the preamble "\definelistextra[page][before=\page,after=\page]",  and 
"\placelist[chapter,section][criterium=text,extras={1.2=page}]" in the text.
But now, with the same version of mkiv, nothing happens.
Has this method of forcing a page-break in the ToC mysteriuosly diswppeared or do I use the worng command?

Best regards,
Robert Blackstone







More information about the ntg-context mailing list