From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109414 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sylvain Hubert Newsgroups: gmane.comp.tex.context Subject: Re: page ends with a section title followed by a table Date: Tue, 10 Nov 2020 17:23:24 +0100 Message-ID: References: <35814d97-14af-0aeb-ab21-d49e02fccdfb@gmx.es> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1025990432317187507==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34952"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 10 17:24:05 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcWRA-0008y0-9v for gctc-ntg-context-518@m.gmane-mx.org; Tue, 10 Nov 2020 17:24:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3EB1D1A9C3C; Tue, 10 Nov 2020 17:23:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7JTNEVSq2UJQ; Tue, 10 Nov 2020 17:23:39 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4B0B71A9DDD; Tue, 10 Nov 2020 17:23:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 26F6F1A9D8E for ; Tue, 10 Nov 2020 17:23:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pr_tydQfdyeL for ; Tue, 10 Nov 2020 17:23:37 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.172; helo=mail-il1-f172.google.com; envelope-from=champignoom@gmail.com; receiver= Original-Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6AF051A9C3C for ; Tue, 10 Nov 2020 17:23:37 +0100 (CET) Original-Received: by mail-il1-f172.google.com with SMTP id a20so12669650ilk.13 for ; Tue, 10 Nov 2020 08:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=jQ9WUgqOVL8+cXxW+LkfxSjBAM5wBeWFe+pk4dGEI9U=; b=T9bLhsOVm7lxVA1G0qp2V1A3mrUvXMJRWauLh3olO0DUGUdxX413eNu/vDaYTBwh6M Yw96XBdLHHARRF7or3j6hib8HP+FCh/Ik4BVS/6ZiubknhuRF9NDTwIYHW2Cvnj0EGma 19xhDQoAT2h44Ks9ebwafHCW7hCCCw2skmogVbTEJynoqHRwXTHANy9TfTGOmjz9LY1z ui1a+cLxz5StGt3zPoCvLnWLxuu9eVNv157ySyIbCIXBomDr47UCmoQWJ2oC7XBO02UC XRdrK1wSpyUhKV6BJhT3nUWX5+0j5SL/QDLxBwZ/qvZvF++Wd2aI5ZG3+QfelNGgCSTX WBaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=jQ9WUgqOVL8+cXxW+LkfxSjBAM5wBeWFe+pk4dGEI9U=; b=YOQMAH7eTBs9LwC15ZH91EEu4wwqZDKzPAi9Z+c0mSRncGVSoResqNEOATIxW1I7bq u+3cQ3MsOxnZMFN6nKq0JtF4TOU6H+3zWl54CVqbbaVDNG9RymtEgVOrAzvxJ7/qaTf/ hqewjuKqN2NjfB9MSCFi3xbUEWoOhMYXfEz6nxkid89XuUb084TmI0YzJwkTShFrc8LN BUxgu01M6ul0FxvFk3zNAnogMkjcB9ZE7pH+Q/xSqUtb76ne+GjKt2lfZXeBzLCusJF9 KUQyLiYZUn7d7/6LP2GAw7EFVUC+2+kolD3zRjDOtCpiD4E5/DCCj/drvYJFPch1QHlX YDPw== X-Gm-Message-State: AOAM532oSLQcpu/5vJD/kPZkY+idiwpVxZntiXNPAsHprj+dTccWcF7A nVADJpBA0S0xdjz+RLfkJJICbuRn+MMlCzhxN1b7lValJqfvgg== X-Google-Smtp-Source: ABdhPJzb7RDn7pbw6sEC2uoQKMXE0Mtas72uo9Og5w63jgfC/maigr51q/ec9C5s1G6MZmO5l6jFD+96eKLlK4wR5Lw= X-Received: by 2002:a05:6e02:801:: with SMTP id u1mr14957294ilm.199.1605025415965; Tue, 10 Nov 2020 08:23:35 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:109414 Archived-At: --===============1025990432317187507== Content-Type: multipart/alternative; boundary="000000000000c631db05b3c3193e" --000000000000c631db05b3c3193e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My mistake, but the problem survives the fix: \setuphead[section][after=3D{\blank[samepage,big]}] \starttext \showframe \dorecurse{50}{a } \startsection[title=3Dspec] \startxtable \startxrow \startxcell[ny=3D30]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 wrote: > > On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez 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=3D{\blank[preference, big], >> after=3D{\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=E2=80=99t 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=3D{\blank[preference, big]}] nor [after=3D{\blank[samepage, big]}= ] nor > both worked. I trimmed it into the following example which behaves the sa= me: > > \starttext > \showframe > \dorecurse{50}{a } > \startsection[title=3Dspec][before=3D{\blank[preference,big]}, > after=3D{\blank[samepage,big]}] > \startxtable > \startxrow > \startxcell[ny=3D30]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 > --000000000000c631db05b3c3193e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My mistake, but the problem survives the fix:

=C2=A0 =C2=A0 \setuphead[section][after=3D{\blank[samepag= e,big]}]
=C2=A0 =C2=A0 \starttext
=C2=A0 =C2=A0 \showframe
=C2=A0 = =C2=A0 \dorecurse{50}{a }
=C2=A0 =C2=A0 \startsection[title=3Dspec]
= =C2=A0 =C2=A0 \startxtable
=C2=A0 =C2=A0 \startxrow
=C2=A0 =C2=A0 \st= artxcell[ny=3D30]a\stopxcell\startxcell 1\stopxcell
=C2=A0 =C2=A0 \stopx= row
=C2=A0 =C2=A0 \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopx= row}
=C2=A0 =C2=A0 \stopxtable
=C2=A0 =C2=A0 \stoptext

=
Sylvain

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

On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez <= ;oinos@gmx.es> wro= te:
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,

=C2=A0 \setuphead[title]
=C2=A0 =C2=A0 [before=3D{\blank[preference, big],
=C2=A0 =C2=A0 =C2=A0after=3D{\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=E2=80=99t need both simultaneously.

Just in case it helps,

Pablo

Hello Pablo,

<= /div>
Thank you very much for the help. The penalty of \blank indeed br= ings the solution closer and it does format the previous example correctly.=

However, when I went back to the original documen= t, neither [before=3D{\blank[preference, big]}] nor [after=3D{\blank[samepa= ge, big]}] nor both worked. I trimmed it into the following example which b= ehaves the same:

=C2=A0 =C2=A0 \starttext
=C2= =A0 =C2=A0 \showframe
=C2=A0 =C2=A0 \dorecurse{50}{a }
=C2=A0 =C2=A0 = \startsection[title=3Dspec][before=3D{\blank[preference,big]}, after=3D{\bl= ank[samepage,big]}]
=C2=A0 =C2=A0 \startxtable
=C2=A0 =C2=A0 \startxr= ow
=C2=A0 =C2=A0 \startxcell[ny=3D30]a\stopxcell\startxcell 1\stopxcell<= br>=C2=A0 =C2=A0 \stopxrow
=C2=A0 =C2=A0 \dorecurse{29}{\startxrow\start= xcell 2\stopxcell\stopxrow}
=C2=A0 =C2=A0 \stopxtable
=C2=A0 =C2=A0 \= stoptext

Do you have an idea on how this could als= o be formatted correctly or how one could inspect and debug the penalty?

Thanks again!

Sylvain
--000000000000c631db05b3c3193e-- --===============1025990432317187507== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1025990432317187507==--