From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/111622 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: Understanding penalties for orphans and widows Date: Tue, 1 Jun 2021 12:05:28 +0000 Message-ID: <3c9f1f9e69f540fc830d372f2bba23b3@ub.unibe.ch> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5286231653984176554==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31857"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 01 14:06:03 2021 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 1lo39m-0007we-Vn for gctc-ntg-context-518@m.gmane-mx.org; Tue, 01 Jun 2021 14:06:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 181862803D8; Tue, 1 Jun 2021 14:05:34 +0200 (CEST) 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 ZWO_LzYoZlyd; Tue, 1 Jun 2021 14:05:33 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E7014284050; Tue, 1 Jun 2021 14:05:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3ABE0284050 for ; Tue, 1 Jun 2021 14:05:31 +0200 (CEST) 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 OHOeUTLJ5Hyw for ; Tue, 1 Jun 2021 14:05:30 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=130.92.0.84; helo=mailhub-lb3.unibe.ch; envelope-from=denis.maier@ub.unibe.ch; receiver= Original-Received: from mailhub-lb3.unibe.ch (mailhub-lb3.unibe.ch [130.92.0.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id EB4062803D8 for ; Tue, 1 Jun 2021 14:05:29 +0200 (CEST) X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-03.campus.unibe.ch [130.92.13.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb3.unibe.ch (Postfix) with ESMTPS id ABBFD5000C1 for ; Tue, 1 Jun 2021 14:05:28 +0200 (CEST) Thread-Topic: Understanding penalties for orphans and widows Thread-Index: AddW3YcLiL1Wh/7MTeGTlEdBJCPESA== Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [172.18.72.2] 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:111622 Archived-At: --===============5286231653984176554== Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_3c9f1f9e69f540fc830d372f2bba23b3ubunibech_" --_000_3c9f1f9e69f540fc830d372f2bba23b3ubunibech_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I've read in the wiki (https://wiki.contextgarden.net/Widows_and_orphans_co= ntrol) that this setting can be used to keep at least two lines together: \startsetups[grid][mypenalties] \setdefaultpenalties \setpenalties\widowpenalties{2}{10000} \setpenalties\clubpenalties {2}{10000} \stopsetups After experimenting with the first argument (see below) it looks to me as i= f the wording on the wiki should be changed a bit, from to (penalties1 gives me one full line and a second line that is almo= st full ; penalties2 results in two full lines with a third line that is al= most full.). Is my interpretation correct? Denis \setuppapersize[A6] \setuplayout[lines=3D20] \setupalign[line] \showframe \startsetups[penalties1] \setdefaultpenalties \setpenalties\widowpenalties{1}{10000} \stopsetups \startsetups[penalties2] \setdefaultpenalties \setpenalties\widowpenalties{2}{10000} \stopsetups \starttext \setuplayout[setups=3Dpenalties1] \samplefile{tufte}\par Here we are writing some more words to see the effect. Here we are writing some more words to see the effect. Here we are writing some more words to see the effect. \page \setuplayout[setups=3Dpenalties2] \samplefile{tufte}\par Here we are writing some more words to see the effect. Here we are writing some more words to see the effect. Here we are writing some more words to see the effect. \stoptext --_000_3c9f1f9e69f540fc830d372f2bba23b3ubunibech_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I’v= e read in the wiki (https://wiki.contextgarden.net/Widows_and_orphans_control) that this setting can be used to keep at least two lines together:

&nbs= p;

\startsetups[grid][mypenalties]=

    \setdefaultp= enalties

    \setpenaltie= s\widowpenalties{2}{10000}

    \setpenaltie= s\clubpenalties {2}{10000}

\stopsetups

 

After experimenting with the fi= rst argument (see below) it looks to me as if the wording on the wiki shoul= d be changed a bit, from «Example how to keep at least 2 lines togeth= er» to «Example how to keep at least 2 full lines together» (penalties1 gives me one full line and a = second line that is almost full ; penalties2 results in two full lines= with a third line that is almost full.).

 

Is my interpretation correct?

 

Denis

 

\setuppapersize[A6]<= /span>

\setuplayout[lines=3D20]

\setupalign[line]

 

\showframe

 

\startsetups[penalties1]

    \setdefaultp= enalties

    \setpenaltie= s\widowpenalties{1}{10000}

\stopsetups

 

\startsetups[penalties2]

    \setdefaultp= enalties

    \setpenaltie= s\widowpenalties{2}{10000}

\stopsetups

 

\starttext

     &= nbsp;         

\setuplayout[setups=3Dpenalties= 1]

 

\samplefile{tufte}\par  

Here we are writing some more words to see the effec= t.

Here we are writing some more words to see the effec= t.

Here we are writing some more words to see the effec= t.

 

\page

\setuplayout[setups=3Dpenalties= 2]

 

\samplefile{tufte}\par &nb= sp;

Here we are writing some more words to see the effec= t.

Here we are writing some more words to see the effec= t.

Here we are writing some more words to see the effec= t.

        &nbs= p;      

\stoptext

--_000_3c9f1f9e69f540fc830d372f2bba23b3ubunibech_-- --===============5286231653984176554== 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== --===============5286231653984176554==--