[NTG-context] Keeping section and subsection together

Procházka Lukáš Ing. - Pontex s. r. o. LPr at pontex.cz
Fri Apr 24 11:07:32 CEST 2015


Hello,

thanks Pablo for the suggestion and Hans for the solution...

I'd rather wait publishing the "trick" "\setuphead[section][after={\blank[samepage,big]}]" as I think this issue will be handled systematically (Hans' intention for the next beta).

Best regards,

Lukas


On Fri, 24 Apr 2015 10:31:50 +0200, Hans Hagen <pragma at wxs.nl> wrote:

> On 4/24/2015 7:32 AM, Pablo Rodriguez wrote:
>> On 04/23/2015 11:50 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>>> Hello,
>>>
>>> the following sample generates section title "5 Sec" as a
>>> last/solitary heading (section) on the page.
>>>
>>> ----
>>> \starttext
>>>     \dorecurse{5}{
>>>       \section{Sec}
>>>         \subsection{Subsec}
>>>           \input ward
>>>     }
>>> \stoptext
>>> ----
>>>
>>> Is there a way to bind it with the next head (subsection) - so that
>>> "5 Sec", "5.1 Subsec" (and at least one line of the following
>>> paragraph) would be together on one page?
>>
>> Hi Lukáš,
>>
>> add the following to the document preamble:
>>
>>      \setuphead[section][after={\blank[samepage,big]}]
>>
>> BTW, could you add this to http://wiki.contextgarden.net/Titles?
>
> actually there is rather complex code in the core that deals with it ..
> (and also deals with too many on one page and so, as it's a weighted
> system) ... i just checked and a variable is not reset .. fixed in an
> upcoming beta (no upload yet, first alan and i need to agree on some bib
> issues working ok)
>
> Hans


-- 
Ing. Lukáš Procházka | mailto:LPr at pontex.cz
Pontex s. r. o.      | mailto:pontex at pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038



More information about the ntg-context mailing list