From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95018 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: orphan headline Date: Thu, 26 May 2016 21:55:23 +0200 Message-ID: <574754AB.80500@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3525685963721278101==" X-Trace: ger.gmane.org 1464292577 29843 80.91.229.3 (26 May 2016 19:56:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 19:56:17 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 26 21:56:01 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b61Nx-0002wk-8O for gctc-ntg-context-518@m.gmane.org; Thu, 26 May 2016 21:56:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A355DE482; Thu, 26 May 2016 21:55:40 +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 1JXyi9oWMimO; Thu, 26 May 2016 21:55:38 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 9948AE484; Thu, 26 May 2016 21:55:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 97E6DE482 for ; Thu, 26 May 2016 21:55:37 +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 A3u_gbKdmFBl for ; Thu, 26 May 2016 21:55:36 +0200 (CEST) Original-Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7DCE0E481 for ; Thu, 26 May 2016 21:55:26 +0200 (CEST) Original-Received: by mail-wm0-f52.google.com with SMTP id n129so242609461wmn.1 for ; Thu, 26 May 2016 12:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=tGP9c9pxKpUFXbBxi4G70DoJnTEWmcJjtqCFKzrnUbE=; b=cqNxGP78MCfvSWPsUwm23oc2pLY083XiWEMdERmozOylidha5YS7gzn6RnWs1DNaYx yCGiTqFv5VedNleoiiOC90RmWLDAI7hMQuosANJwuo4veD3sXO1saW1Tw8usH7yMcftP i3IqIqZ8Hz5S3gHIc4ihX0uWXgdD0LpjPWfz3GwxKNMaufQadwP1br3dKNXk6wM8EdaG nxEDXnM4U3JxwYVHSQRcbS0j8BIXa0UOTS+hz0FiCxNesvLQjR2eIA1hGllmIqOI9dLX Tlr1FRHCoT7gXS261RrkbqzAMUD8/3kOSVjorQh58EYFm0fqhUdTX7TrsAycQXi3mYEX gJlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=tGP9c9pxKpUFXbBxi4G70DoJnTEWmcJjtqCFKzrnUbE=; b=jpYmJCpoH6ygD61UCUNnjFGxSdy0lgpJlACrwMtyTSczhpAh10sw9CejJEMfd7r9Gu 2z7ky0SAm14r08PbgemMTO4W/2DjlW4W9sDb7oIj3MvihhSERF2qEiTkATU+zMTYhLEw SfPy8oc5UBdGq9LBMbitegCgb2RreKkIjpVAo2DpWIqPoYXKHgiM7l2cqY2uL9QdsXXu y9So0Uw04c7v6OEWU8qIqe/0SvJeKMutQt0sYM+v0XayA7NyCHJOCZlf/acKT6qXim6B vqBRJm7iLFoKxRysdbDFsDxpBeXrO8o6/w5Ju/CmuLO+2+65OBnk9GF62OeTs1gmshwa hhLQ== X-Gm-Message-State: ALyK8tL2/uI8KsNr+Fdn1V2hkn+vWOYROdk1bHYmwdY6cTfNEohVFuLztIRIEzrZhC/buQ== X-Received: by 10.194.158.69 with SMTP id ws5mr11154208wjb.17.1464292526087; Thu, 26 May 2016 12:55:26 -0700 (PDT) Original-Received: from keima.localdomain (x2f27bd4.dyn.telefonica.de. [2.242.123.212]) by smtp.gmail.com with ESMTPSA id jd4sm15835921wjb.43.2016.05.26.12.55.25 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2016 12:55:25 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:95018 Archived-At: This is a multi-part message in MIME format. --===============3525685963721278101== Content-Type: multipart/alternative; boundary="------------070007070909030000090006" This is a multi-part message in MIME format. --------------070007070909030000090006 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Andrea Valle > 26. Mai 2016 um 10:56 > Dear all, > > I=E2=80=99m finishing a book, and getting the following undesired resul= t. > Many times I have section or subsection title at the bottom of a page,=20 > with no text. Text starts on the next page. > I have looked at > > http://wiki.contextgarden.net/Widows_and_orphans_control > > but I wasn=E2=80=99t able to solve. > > I guess it could depend on the formatting of my headlines. Here they ar= e: > > \setuphead[section] > [style=3D\ss\tfa,=20 > before=3D{\blank[0.5cm]\startframedtext[offset=3D0.25cm,framecolor=3Dbl= ack, > rulethickness=3D0.01cm, frame=3Doff, topframe=3Doff,=20 > bottomframe=3Don]\crlf},after=3D{\stopframedtext\noindentation\blank[1= cm]}] > > \setuphead[subsection] > [style=3D\ss,=20 > before=3D{\blank[0.5cm]\startframedtext[offset=3D0.25cm,framecolor=3Dbl= ack, > rulethickness=3D0.01cm, frame=3Doff, topframe=3Doff,=20 > bottomframe=3Don]\crlf},after=3D{\stopframedtext\noindentation\blank[1= cm]}] Your lack of a working minimal example makes it hard to give a solution but adding changing the way how the frame is added should improve things. \startsetups[section:andrea] \ifconditional\headshownumber \scratchdimenone\dimexpr\headnumberwidth+\headnumberdistance\rel= ax \scratchdimentwo\dimexpr\headnumberdistance\relax \else \scratchdimenone\zeropoint \scratchdimentwo\zeropoint \fi =20 \startframedtext[offset=3D0.25cm,loffset=3D\scratchdimenone,rulethickness= =3D0.01cm,frame=3Doff,bottomframe=3Don] \dontleavehmode\llap{\headnumbercontent\hskip\scratchdimentwo} \headtextcontent \stopframedtext \stopsetups \defineheadalternative[section:andrea][alternative=3Dvertical,renderingse= tup=3Dsection:andrea] \setuphead [section] [alternative=3Dsection:andrea, numberwidth=3D1em, before=3D{\blank[0.5cm]}, after=3D{\blank[1cm]}] \starttext \section{\input ward } \subject{\input ward } \stoptext Wolfgang --------------070007070909030000090006 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
26= .=20 Mai 2016 um 10:56
Dear all,=C2=A0
I=E2=80=99m finishing a book, and gettin= g the=20 following undesired result.
Many times I have sectio= n or subsection title at the bottom of a page, with no text. Text starts=20 on the next page.
I have looked at=C2=A0


but I wasn=E2=80=99t abl= e to solve.

I guess it could depend = on=20 the formatting of my headlines. Here they are:=C2=A0
\setuphead[section]
[style=3D\ss\tfa,=20 before=3D{\blank[0.5cm]\startframedtext[offset=3D0.25cm,framecolor=3Dblac= k,
rulethickness=3D0.01cm, frame=3Doff, topframe=3Doff,=20 =C2=A0bottomframe=3Don]\crlf},after=3D{\stopframedtext\noindentation\blan= k[1cm]}]

\setuphead[subsection]
[style=3D\ss,=20 before=3D{\blank[0.5cm]\startframedtext[offset=3D0.25cm,framecolor=3Dblac= k,
rulethickness=3D0.01cm, frame=3Doff, topframe=3Doff,=20 =C2=A0bottomframe=3Don]\crlf},after=3D{\stopframedtext\noindentation\blan= k[1cm]}]
Your lack of a working minimal example makes it hard to give a solution but adding changing the way how the frame is added should improve=20 things.

\startsetups[section:andrea]
=C2=A0=C2=A0=C2=A0 \ifconditional\headshownumber
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=20 \scratchdimenone\dimexpr\headnumberwidth+\headnumberdistance\relax
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \scratchdimentwo\dimexpr\headnumber= distance\relax
=C2=A0=C2=A0=C2=A0 \else
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \scratchdimenone\zeropoint
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \scratchdimentwo\zeropoint
=C2=A0=C2=A0=C2=A0 \fi
=C2=A0=C2=A0=C2=A0=20 \startframedtext[offset=3D0.25cm,loffset=3D\scratchdimenone,rulethickness= =3D0.01cm,frame=3Doff,bottomframe=3Don]
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \dontleavehmode\llap{\headnumbercon= tent\hskip\scratchdimentwo}
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \headtextcontent
=C2=A0=C2=A0=C2=A0 \stopframedtext
\stopsetups

\defineheadalternative[section:andrea][alternative=3Dvertical,renderingse= tup=3Dsection:andrea]

\setuphead
=C2=A0 [section]
=C2=A0 [alternative=3Dsection:andrea,
=C2=A0=C2=A0 numberwidth=3D1em,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 before=3D{\blank[0.5cm]},
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 after=3D{\blank[1cm]}]
\starttext

\section{\input ward }

\subject{\input ward }

\stoptext

Wolfgang
--------------070007070909030000090006-- --===============3525685963721278101== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============3525685963721278101==--