From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109420 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 18:06:31 +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="===============8648367091604110585==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10795"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 10 18:19:54 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 1kcXJ8-0002dY-64 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 10 Nov 2020 18:19:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9CCEE1AA31F; Tue, 10 Nov 2020 18:06:46 +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 vk-AShZ5W0h8; Tue, 10 Nov 2020 18:06:45 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B41191AA331; Tue, 10 Nov 2020 18:06:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 056641AA2F2 for ; Tue, 10 Nov 2020 18:06:45 +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 AgdiD-76RpGz for ; Tue, 10 Nov 2020 18:06:44 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.169; helo=mail-il1-f169.google.com; envelope-from=champignoom@gmail.com; receiver= Original-Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (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 4DAE61A9B7C for ; Tue, 10 Nov 2020 18:06:44 +0100 (CET) Original-Received: by mail-il1-f169.google.com with SMTP id y9so5744964ilb.0 for ; Tue, 10 Nov 2020 09:06:44 -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=zrWG7jrs+UV7nYDFlQPbK0Yq62ljOs4oTQ6RS1bBRBs=; b=Bn6/R0PmQOPZZ/c20VYtUkL7KYzFn5oAXk73jMIgnsrWcChDTvkQi74eYGOJKEttXk zSilhnJUDy+zlEK8BtNjnMgD2OUw5a192BYiALRQz/qHU07blw7ETfQO5UGdX33XlrdQ QDRb9x1+VSQ2KRPdsBKyO7x6QKU7ZNv6ABA59aBN/OUjUV1LrEgKgPqR/nnoRUjTIFqi Pq6MOvMpubLCS+huiigAEZOwvyT4gTNqcGqIq/pEjRkV8u782VwB6b5BvtFvsWMDM1AX nV5593h4Ct0VRiVuw6OI/pgDWJbAMseLa/LD1z45fI3A6B9O4FGI8y7MhU46JgozW1tR FrKg== 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=zrWG7jrs+UV7nYDFlQPbK0Yq62ljOs4oTQ6RS1bBRBs=; b=tsQImnhcITABEvMhsSuPEeExR2DSSOSBUJL2Uqjom5xqQz4fDdgFAwNEgzUFez6+tr q3oVmy/Q0Vko4Q7Xqs3o5Z1NnSzgh7vnioZo7WIaZbVW5LWMkbsvfh7TOOfZEOxJ80wC aVeucjTGQsKyf3pD1k/N0hgDHpRYQNUiEmSPA3ON43JjlsROZcsUuia7+81x1oh9f4pc tJRQj2llcEGZtU4NmxuMxsbz5gNMCQf1mVUdvDa9Pz7zfFz8mFKcrNN+tWjpcaTROaFB lFpybLAypPfyst8306wWLVgRQYBq7bR/rX6jczTFeWD/sWQBiVNkexYzUA8ypRG/zBIc gd3w== X-Gm-Message-State: AOAM531X/Xtv7Jk6y6lPn8Ud5+RIngDTqF5eR55KyZ7/nrGiO9+WH/8o zaYXcUCnyfYfmfS8AxjaF+KWM4wrJHcPZx4tflNXHlL/NLKplg== X-Google-Smtp-Source: ABdhPJwdmiqans4wji1ggkHHfreKZvwmyRCd8dxbyspU9te9yvWyjSfOGo0tp6uNt+pYc+MQgkgWkPrhNQxtqkNeaWE= X-Received: by 2002:a05:6e02:1049:: with SMTP id p9mr10695063ilj.102.1605028002842; Tue, 10 Nov 2020 09:06:42 -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:109420 Archived-At: --===============8648367091604110585== Content-Type: multipart/alternative; boundary="000000000000f6cd6505b3c3b3b7" --000000000000f6cd6505b3c3b3b7 Content-Type: text/plain; charset="UTF-8" On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote: > Pablo Rodriguez schrieb am 10.11.2020 um 15:59: > > 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. > > Another method is to move the section title to the next page when the > remaining spaces > is below a specified number of lines. The following setup forces a page > break when > less than 4 lines remain on the current page. > > \setuphead > [section] > [before={\testpage[4]\blank[2*big]}] > > Wolfgang > Hi Wolfgang, Thanks for the suggestion, but as illustrated by the second example, copied here, where the section title is at the top of the page: \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 it is sometimes difficult to predict how much remaining space should trigger a line break. Sylvain --000000000000f6cd6505b3c3b3b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com&= gt; wrote:
Pablo= Rodriguez schrieb am 10.11.2020 um 15:59:
> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
>> Dear List,
>>
>> In the following example, the section title appears at the very en= d 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 =C2=A0 \setuphead[title]
>=C2=A0 =C2=A0 =C2=A0 [before=3D{\blank[preference, big],
>=C2=A0 =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.

Another method is to move the section title to the next page when the
remaining spaces
is below a specified number of lines. The following setup forces a page break when
less than 4 lines remain on the current page.

\setuphead
=C2=A0=C2=A0 [section]
=C2=A0=C2=A0 [before=3D{\testpage[4]\blank[2*big]}]

Wolfgang

Hi Wolfgang,

Than= ks for the suggestion, but as illustrated by the second example, copied her= e, where the section title is at the top of the page:
=C2=A0 =C2=A0 \starttext
=C2=A0 =C2=A0 \showframe
=C2=A0= =C2=A0 \dorecurse{50}{a }
=C2=A0 =C2=A0 \startsection[title=3Dspec][bef= ore=3D{\blank[preference,big]}, after=3D{\blank[samepage,big]}]
=C2=A0 = =C2=A0 \startxtable
=C2=A0 =C2=A0 \startxrow
=C2=A0 =C2=A0 \startxcel= l[ny=3D30]a\stopxcell\startxcell 1\stopxcell
=C2=A0 =C2=A0 \stopxrow
= =C2=A0 =C2=A0 \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}=C2=A0 =C2=A0 \stopxtable
=C2=A0 =C2=A0 \stoptext

<= div>it is sometimes difficult to predict how much remaining space should tr= igger a line break.

Sylvain
--000000000000f6cd6505b3c3b3b7-- --===============8648367091604110585== 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== --===============8648367091604110585==--