From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45293 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 23:42:21 +0100 Message-ID: <20081104224221.GJ2264@atos.labs.wmid.amu.edu.pl> References: <20081104202128.GB2264@atos.labs.wmid.amu.edu.pl> <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> <6011F4E6-7CCD-48B1-BC6B-8084B8BAAD29@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225839276 6631 80.91.229.12 (4 Nov 2008 22:54:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 22:54:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 04 23:55:39 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from mail-forward1.uio.no ([129.240.10.70]) by lo.gmane.org with esmtp (Exim 4.50) id 1KxUo7-00041U-3z for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 23:55:31 +0100 Original-Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.69) (envelope-from ) id 1KxUn0-0005CG-Hz for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 23:54:22 +0100 Original-Received: from mail-mx5.uio.no ([129.240.10.46]) by mail-out1.uio.no with esmtp (Exim 4.69) (envelope-from ) id 1KxUn0-0005CD-Gn for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 23:54:22 +0100 Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by mail-mx5.uio.no with esmtp (Exim 4.69) (envelope-from ) id 1KxUmz-0001KR-SI for gctc-ntg-context-518@m.gmane.org; Tue, 04 Nov 2008 23:54:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D58121FC74; Tue, 4 Nov 2008 23:44:20 +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 05448-03-4; Tue, 4 Nov 2008 23:43:04 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CB1C91FB71; Tue, 4 Nov 2008 23:43:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BC2F41FB49 for ; Tue, 4 Nov 2008 23:43:01 +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 05448-03-3 for ; Tue, 4 Nov 2008 23:42:22 +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 E97C51FBB8 for ; Tue, 4 Nov 2008 23:42:21 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by atos.wmid.amu.edu.pl (Postfix) with ESMTP id 9BDBB15328B1 for ; Tue, 4 Nov 2008 23:42:21 +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 CoskNwThda42 for ; Tue, 4 Nov 2008 23:42:21 +0100 (CET) Original-Received: by atos.wmid.amu.edu.pl (Postfix, from userid 3884) id 6B0FD15328B4; Tue, 4 Nov 2008 23:42:21 +0100 (CET) Content-Disposition: inline In-Reply-To: <6011F4E6-7CCD-48B1-BC6B-8084B8BAAD29@gmail.com> 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 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, MISSING_SUBJECT=0.001,NO_RECEIVED=-0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: BD424568C96C0A090C01183DFAE0B66E8642D07F X-UiO-SPAM-Test: remote_host: 131.211.172.88 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 10 total 11911 max/h 13 blacklist 0 greylist 0 ratelimit 0 Xref: news.gmane.org gmane.comp.tex.context:45293 Archived-At: 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;)? Greets -- Marcin Borkowski (http://mbork.pl) People can be divided into two groups: those who can be divided into two groups and those who can't. ___________________________________________________________________________________ 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 ___________________________________________________________________________________