[NTG-context] page ends with a section title followed by a table

Sylvain Hubert champignoom at gmail.com
Tue Nov 10 17:23:24 CET 2020


My mistake, but the problem survives the fix:

    \setuphead[section][after={\blank[samepage,big]}]
    \starttext
    \showframe
    \dorecurse{50}{a }
    \startsection[title=spec]
    \startxtable
    \startxrow
    \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
    \stopxrow
    \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
    \stopxtable
    \stoptext

Sylvain

On Tue, 10 Nov 2020 at 17:11, Sylvain Hubert <champignoom at gmail.com> wrote:

>
> On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez <oinos at gmx.es> wrote:
>
>> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
>> > Dear List,
>> >
>> > In the following example, the section title appears at the very end of
>> > the first page.
>> > [...]
>> > Does anyone know where to adjust the penalty in this case, so that the
>> > section title can be repositioned to the next page?
>>
>> Hi Sylvain,
>>
>>   \setuphead[title]
>>     [before={\blank[preference, big],
>>      after={\blank[samepage, big]]
>>
>> In this case, the blank space before sets a preference for inserting a
>> page break. The blank space after requires to be in the same page with
>> next paragraph.
>>
>> Of course, you don’t need both simultaneously.
>>
>> Just in case it helps,
>>
>> Pablo
>>
>
> Hello Pablo,
>
> Thank you very much for the help. The penalty of \blank indeed brings the
> solution closer and it does format the previous example correctly.
>
> However, when I went back to the original document, neither
> [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
> both worked. I trimmed it into the following example which behaves the same:
>
>     \starttext
>     \showframe
>     \dorecurse{50}{a }
>     \startsection[title=spec][before={\blank[preference,big]},
> after={\blank[samepage,big]}]
>     \startxtable
>     \startxrow
>     \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
>     \stopxrow
>     \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
>     \stopxtable
>     \stoptext
>
> Do you have an idea on how this could also be formatted correctly or how
> one could inspect and debug the penalty?
>
> Thanks again!
>
> Sylvain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201110/535da5cb/attachment.htm>


More information about the ntg-context mailing list