From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76900 Path: news.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: preventing page breaks after headings Date: Tue, 12 Jun 2012 08:17:09 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1550512620==" X-Trace: dough.gmane.org 1339503446 14894 80.91.229.3 (12 Jun 2012 12:17:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2012 12:17:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 12 14:17:26 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SeQ2H-0000xH-CK for gctc-ntg-context-518@m.gmane.org; Tue, 12 Jun 2012 14:17:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6542B101EB; Tue, 12 Jun 2012 14:17:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TskH0J0SYaaM; Tue, 12 Jun 2012 14:17:20 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0CE9B101DF; Tue, 12 Jun 2012 14:17:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4CBD1101DF for ; Tue, 12 Jun 2012 14:17:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rZ51i9NMT2jF for ; Tue, 12 Jun 2012 14:17:12 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 2D02E101DD for ; Tue, 12 Jun 2012 14:17:12 +0200 (CEST) Original-Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q5CCHAsN028311 for ; Tue, 12 Jun 2012 14:17:10 +0200 Original-Received: by qafl39 with SMTP id l39so344365qaf.2 for ; Tue, 12 Jun 2012 05:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2YWkedqU4cwu9o5bYXLF/Jx6SJ0uvEPcAAVu9tg6dpA=; b=kxOft/omti31rcFlxrR40ZmFx9syA3BDvEqGX30qOL0TGg90WneX/icxdMenJ7NPqS gG5wZKrXkZK6lHI2+ei9qx2YS7TEfm3gb7+D24lvq0v4mXCNHcF/jfbBDWs05MBHpvMp RTBpr521pQkClKjPGByO3AvWt/9DLrmwAgzP0/9PHKjgZ/Yr2PURl+/ldnDYQAA2/1Ms lwYcf1EhwRhZF26JE4ai+5L6umIgroI4zUZ8mJczAl7A8auf8i3fiOAYYdylHKDRHE47 zhIrlWTN20lOgM6RqNFgiqSbxcMzxV3m1ZJhcIvnH8z/ZxfpD/ykSP3Pz9Ri6jvfu4hr 9nXw== Original-Received: by 10.229.136.142 with SMTP id r14mr8202368qct.57.1339503429670; Tue, 12 Jun 2012 05:17:09 -0700 (PDT) Original-Received: by 10.229.14.70 with HTTP; Tue, 12 Jun 2012 05:17:09 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.50; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NHlohaJK - 6f8529301386 - 20120612 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 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 Xref: news.gmane.org gmane.comp.tex.context:76900 Archived-At: --===============1550512620== Content-Type: multipart/alternative; boundary=00248c71180d19d90304c2457216 --00248c71180d19d90304c2457216 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks!, Wolfgang. As ever, you are a life saver. I was able to remove all but one of the weird page breaks using your suggestions. The last one was resolved by moving a \startegister a few words further along in the paragraph. Alan On Sun, Jun 10, 2012 at 3:13 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote: > > Am 10.06.2012 um 20:52 schrieb Alan Bowen: > > > Is there a way in MKII to ensure that there is never a page break > between a heading and the following text? > > > > \setuphead[after=3D{\page[no]}] does not seem to work without entering > vertical mode before \page. But, so far, I have not found a way to enter > vertical mode in after=3D{=85} that does not add interlinespace and thus = place > the text too far from the heading. > > > > Any suggestion or alternatives? > > Do you have a example where you get an unwanted page break because contex= t > tries to prevent it. > > When you can=92t make one in a short time try one of the following method= s: > > > 1. Insert a page break before the heading when not enough space is > available. > > \setuphead[=85][before=3D{\testpage[6]\blank[=85]}] > > > 2. Add a big penalty before the vertical space after the heading (don=92t > use this method in mkiv). > > \setuphead[=85][after=3D{\nobreak\blank[=85]}] > > > Wolfgang > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --00248c71180d19d90304c2457216 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks!, Wolfgang. As ever, you are a life saver. I was able to remove all = but one of the weird page breaks using your suggestions. The last one was r= esolved by moving a \startegister a few words further along in the paragrap= h.

Alan

On Sun, Jun 10, 2012 = at 3:13 PM, Wolfgang Schuster <schuster.wolfgang@googlemail= .com> wrote:

Am 10.06.2012 um 20:52 schrieb Alan Bowen:

> Is there a way in MKII to ensure that there is never a page break betw= een a heading and the following text?
>
> \setuphead[after=3D{\page[no]}] does not seem to work without entering= vertical mode before \page. But, so far, I have not found a way to enter v= ertical mode in after=3D{=85} that does not add interlinespace and thus pla= ce the text too far from the heading.
>
> Any suggestion or alternatives?

Do you have a example where you get an unwanted page break because co= ntext tries to prevent it.

When you can=92t make one in a short time try one of the following methods:=


1. Insert a page break before the heading when not enough space is availabl= e.

\setuphead[=85][before=3D{\testpage[6]\blank[=85]}]


2. Add a big penalty before the vertical space after the heading (don=92t u= se this method in mkiv).

\setuphead[=85][after=3D{\nobreak\blank[=85]}]


Wolfgang
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

--00248c71180d19d90304c2457216-- --===============1550512620== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1550512620==--