From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45291 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to avoid a page break? Date: Tue, 4 Nov 2008 23:25:17 +0100 Message-ID: <6011F4E6-7CCD-48B1-BC6B-8084B8BAAD29@gmail.com> References: <20081104202128.GB2264@atos.labs.wmid.amu.edu.pl> <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225837650 951 80.91.229.12 (4 Nov 2008 22:27:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 22:27:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 04 23:28: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 1KxUNq-0003B7-VQ for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 23:28:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3101C1FC7A; Tue, 4 Nov 2008 23:27:12 +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 05156-03-2; Tue, 4 Nov 2008 23:26:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8F1E51FB7E; Tue, 4 Nov 2008 23:26:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B00BA1FB74 for ; Tue, 4 Nov 2008 23:26:12 +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 04694-01-7 for ; Tue, 4 Nov 2008 23:25:36 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by ronja.ntg.nl (Postfix) with ESMTP id 53D5F1FC00 for ; Tue, 4 Nov 2008 23:25:36 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id l26so2948892fgb.8 for ; Tue, 04 Nov 2008 14:25:36 -0800 (PST) Original-Received: by 10.86.68.2 with SMTP id q2mr259803fga.3.1225837536053; Tue, 04 Nov 2008 14:25:36 -0800 (PST) Original-Received: from ?10.40.62.21? (8.121.113.82.net.de.o2.com [82.113.121.8]) by mx.google.com with ESMTPS id d6sm10794248fga.2.2008.11.04.14.25.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 Nov 2008 14:25:35 -0800 (PST) In-Reply-To: <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> X-Mailer: Apple Mail (2.929.2) 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:45291 Archived-At: Am 04.11.2008 um 22:39 schrieb Marcin Borkowski: > 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. Here is a better method, there is nothing wrong with low level but you should know what you do. \defineblankmethod [nobreak] {\nobreak} \def\doPutTitle#1% {\framed[frame=offwidth=\textwidth,align=middle]{#1}% \blank[nobreak,line]} 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________