From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45294 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:49:47 +0100 Message-ID: References: <20081104202128.GB2264@atos.labs.wmid.amu.edu.pl> <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> <6011F4E6-7CCD-48B1-BC6B-8084B8BAAD29@gmail.com> <20081104224221.GJ2264@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 1225840204 10038 80.91.229.12 (4 Nov 2008 23:10:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 23:10:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 05 00:11:06 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 1KxV3A-0001Do-G2 for gctc-ntg-context-518@m.gmane.org; Wed, 05 Nov 2008 00:11:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B2C261FBD4; Wed, 5 Nov 2008 00:09:54 +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 07234-04-7; Wed, 5 Nov 2008 00:09:06 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B9BB91FB7E; Wed, 5 Nov 2008 00:09:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E76331FB7E for ; Wed, 5 Nov 2008 00:09:03 +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 07234-04-6 for ; Wed, 5 Nov 2008 00:08:16 +0100 (CET) Original-Received: from qb-out-1314.google.com (qb-out-1314.google.com [72.14.204.175]) by ronja.ntg.nl (Postfix) with ESMTP id 1B9541FB49 for ; Tue, 4 Nov 2008 23:50:01 +0100 (CET) Original-Received: by qb-out-1314.google.com with SMTP id e19so1710996qba.8 for ; Tue, 04 Nov 2008 14:50:01 -0800 (PST) Original-Received: by 10.86.89.1 with SMTP id m1mr242364fgb.77.1225839000263; Tue, 04 Nov 2008 14:50:00 -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 12sm10822785fgg.0.2008.11.04.14.49.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 Nov 2008 14:49:59 -0800 (PST) In-Reply-To: <20081104224221.GJ2264@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:45294 Archived-At: Am 04.11.2008 um 23:42 schrieb Marcin Borkowski: > Dnia Tue, Nov 04, 2008 at 11:25:17PM +0100, Wolfgang Schuster > napisał(a): >> >> 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. > > Yes, that's obvious. But high-level is better in one thing: when I > want > to teach ConTeXt to non-TeX-maniacs;), it's the only possibility. > >> >> \defineblankmethod [nobreak] {\nobreak} >> >> \def\doPutTitle#1% >> {\framed[frame=offwidth=\textwidth,align=middle]{#1}% >> \blank[nobreak,line]} > > OK, that's very nice, apart from the thing that the only two ways of > learning it are: (1) studying sources or (2) asking here. Also, the > trick with \framed[frame=off,...] is neat, but I still don't get it: > why > my \startalignment[middle] didn't work? And how does exactly > \blank[something] work? > > Don't think I need these answers *now*. But it would be nice to > understand ConTeXt a bit some day... > > You know, with plain TeX it's relatively easy to understand > *everything* - it's so small and, well, primitive;). With LaTeX > things > get messy, but still I can read the sources - they are very > "plainy", I > mean LaTeX does not have so much UI for developers/package/class > writers, so it's not *that* difficult to understand parts of source > code. But ConTeXt baffles me a lot. I guess that reading sources is > the only remedy - but I don't have enough time now... But some day, I > *will* understand this;). > >> >> Wolfgang >> > > PS. Wolfgang, can I still subscribe to your fan club? Do I get a free > t-shirt;)? Ask Mojca, she has the shirts. 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 ___________________________________________________________________________________