From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45284 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.comp.tex.context Subject: Re: How to avoid a page break? Date: Tue, 4 Nov 2008 22:39:08 +0100 Message-ID: <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> References: <20081104202128.GB2264@atos.labs.wmid.amu.edu.pl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225835069 23992 80.91.229.12 (4 Nov 2008 21:44:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 21:44:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 04 22:45:32 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KxTiK-0004yJ-9j for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 22:45:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50D3A1FC74; Tue, 4 Nov 2008 22:44:19 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32192-01-7; Tue, 4 Nov 2008 22:43:12 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C8D211FC87; Tue, 4 Nov 2008 22:43:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 966511FC87 for ; Tue, 4 Nov 2008 22:43:09 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00800-01 for ; Tue, 4 Nov 2008 22:41:53 +0100 (CET) Original-Received: from atos.wmid.amu.edu.pl (atos.wmid.amu.edu.pl [150.254.78.2]) by ronja.ntg.nl (Postfix) with ESMTP id 05C291FB72 for ; Tue, 4 Nov 2008 22:39:10 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by atos.wmid.amu.edu.pl (Postfix) with ESMTP id A964215328AA for ; Tue, 4 Nov 2008 22:39:08 +0100 (CET) X-Virus-Scanned: by amavisd-new (PLD-Linux) at wmid.amu.edu.pl Original-Received: from atos.wmid.amu.edu.pl ([127.0.0.1]) by localhost (atos.wmid.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id e-8fR9JqXjvw for ; Tue, 4 Nov 2008 22:39:08 +0100 (CET) Original-Received: by atos.wmid.amu.edu.pl (Postfix, from userid 3884) id 70EC915328AC; Tue, 4 Nov 2008 22:39:08 +0100 (CET) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45284 Archived-At: Dnia Tue, Nov 04, 2008 at 10:17:51PM +0100, Wolfgang Schuster napisał(= a): > = > Am 04.11.2008 um 21:21 schrieb Marcin Borkowski: > = > > Hi, > > > > I have the following in my code: > > > > \def\doPutTitle#1{% > > \startalignment[middle] > > \bfb > > \page[bigpreference] > > \blank[2*big] > > #1% > > \page[no]% > > \blank[big]% > > \page[no]% > > \stopalignment > > \page[no]% > > }% > > > > Why is it still possible that I have a page break after, say, > > \doPutTitle{some title} (in MkII, in MkIV page breaks fall in = > > different > > places). Which percentage signs and \page[no]'s are unnecessary here? > = > \def\doPutTitle#1% > {\page[bigpreference] > \vbox\bgroup > \raggedcenter > #1% > \egroup > \nobreak\blank[big]} OK, though this looks rather low-level. I was thinking about something more user-friendly;). This raises a philosophical question: is it the "ConTeXt way" to use low-level constructs in environments and high-level in documents? Or is it better to avoid low level whenever possible? Also, your code mixes low-level commands (\vbox, which is a TeX prmitive, \raggedcenter, which is a ConTeXt low-level command, I guess) and high-level ones (\blank). I understand that this ensures a uniform vertical spacing (\blank[big] is obviously better than \vskip 10pt;)), but I thought that it is against ConTeXt philosophy to use low-level stuff unless something really non-standard is needed. > = > > Also, how to avoid a page break right before an itemization? Adding > > [intro] seems not to work. > = > Example! Sorry, I haven't provided one. Here you are. \starttext \dorecurse{12}{% This is some intro (\recurselevel). \startitemize[n,packed,joinedup,columns,two,intro] \dorecurse{8}{\item This is an item.} \stopitemize }% \stoptext (strange things happen both in MkII and MkIV in the online ConTeXt!) > = > > And one more thing about pagebreaks: how to avoid a pagebreak right > > before a \startformula ... \stopformula? And what is the ConTeXt = > > way of > > setting stretchable vertical glue (e.g. for \blank's, below = > > itemizations > > etc.)? > = > \blank[ small | medium | big | ... ] But how do I control the stretchability? > Wolfgang Greets -- = Marcin Borkowski (http://mbork.pl) O ludzk=B1 twarz - walka trwa! Ju=BF p=B3on=B1 ognie - chwy=E6my za ostrze! Naszym ogniem Moc Najwy=BFszego, ostrzem wierno=B6=E6 obranej drodze... Walka trwa! (Izaiash) ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________