From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/19456 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: Re: widow and orphan control Date: Wed, 30 Mar 2005 09:29:16 -0500 Message-ID: References: <424A772D.9060803@seznam.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1112193028 15184 80.91.229.2 (30 Mar 2005 14:30:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 14:30:28 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 30 16:30:23 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGeCq-0005Qw-JV for gctc-ntg-context-518@m.gmane.org; Wed, 30 Mar 2005 16:30:04 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1D95A128AB; Wed, 30 Mar 2005 16:31:07 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18755-05; Wed, 30 Mar 2005 16:31:06 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BBBDA128BA; Wed, 30 Mar 2005 16:29:19 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 44E16128BA for ; Wed, 30 Mar 2005 16:29:18 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18689-06-2 for ; Wed, 30 Mar 2005 16:29:17 +0200 (CEST) Original-Received: from rdsmtp.iglou.com (rdsmtp.iglou.com [192.107.41.63]) by ronja.ntg.nl (Postfix) with ESMTP id 9E74E12824 for ; Wed, 30 Mar 2005 16:29:17 +0200 (CEST) Original-Received: from [192.107.41.3] (helo=iglou1.iglou.com) by rdsmtp.iglou.com with esmtp (8.12.5/8.12.5) id 1DGeC4-0004Jd-Rc for ntg-context@ntg.nl; Wed, 30 Mar 2005 09:29:16 -0500 Original-Received: from [192.107.41.44] (helo=webmail.iglou.com) by iglou1.iglou.com with esmtp (8.12.5/8.12.5) id 1DGeC4-0002MI-NT for ntg-context@ntg.nl; Wed, 30 Mar 2005 09:29:16 -0500 Original-To: "mailing list for ConTeXt users" X-Mailer: WorldClient Pro 2.2.3 In-Reply-To: <424A772D.9060803@seznam.cz> X-Originating-IP: 192.107.41.44 X-IgLou-Customer: verified X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:19456 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:19456 From: Vit Zyka > >>Hans Hagen wrote (8:53): > >> Paul Tremblay wrote: > >>> What I would need is some type of macro that can determine how much > >>> space is left on the page. If the space is less than some small, > >>> pretermined amount (say, 24 points, for example), then put the > title on > >>> the next page, or put in a \blank[24pt, flexible] > >>> > >>> I know nothing about writing macros, or if this is possible. > >> > >> \testpage[24pt] > > Vit Zyka wrote (11:35): > >\penalty50 > >\vskip3\baselineskip plus1fil > >\nobreak > >\vskip-3\baselineskip plus-1fil > > > >It is useful before section title etc. I believe it is implemented to > >ConTeXt, but I do not know the interface. > > Whawgh! Hans had answered the question before I sent it. Sorry, my > homing pigeon was too lazy... Although Hasselt-to-Prague way in 2.5 hrs > it is not so bad :) > Actually, no! Both your responses help me out. Could you explain your snippet of code? I don't quite know what the \penalty50 means. I know TeX applies a penalty to each line, but I'm confused if the penalty is for fitting the line horizontally or vertically, or both. I know what vskip does, but I'm not sure about the other commands, or the strategy. Incidently, I do very much want code that acts on titles for sections and subsections. That is my exact problem right now. I believe that ConTeXt will generally handle widows if they just occur in a regular paragraph. Hans provided a very useful tidbit in \testpage[24pt], but I'm not sure if I should use this in a macro. I have never written a macro in TeX before. I was hoping I would not have to write macros, but maybe I should just learn the basics? I guess there is a section on macros in the big manual. But that is sitting at home next to my computer that has the ConTeXt on it! Thanks Paul