From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10530 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Conditional Text Date: Fri, 24 Jan 2003 23:24:55 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20030124232039.033864f0@remote-1> References: <5.1.0.14.1.20030120100506.028557e8@server-1> <20030118170642.42ebdcbb.lazycode@linuxkungfu.org> <5.1.0.14.1.20030120100506.028557e8@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1043447108 29854 80.91.224.249 (24 Jan 2003 22:25:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 24 Jan 2003 22:25:08 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18cCG3-0007lH-00 for ; Fri, 24 Jan 2003 23:25:07 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 9D80F10B10; Fri, 24 Jan 2003 23:26:42 +0100 (MET) Original-Received: from smtp02.wxs.nl (smtp02.wxs.nl [195.121.6.54]) by ref.ntg.nl (Postfix) with ESMTP id 9A00110AE7 for ; Fri, 24 Jan 2003 23:25:25 +0100 (MET) Original-Received: from LAPTOP-3.wxs.nl ([213.75.94.236]) by smtp02.wxs.nl (Netscape Messaging Server 4.15) with ESMTP id H98OYX02.137 for ; Fri, 24 Jan 2003 23:25:45 +0100 X-Sender: hagen-mail@remote-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: <20030124222402.GA4320@ruhrau.de> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:10530 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10530 At 11:24 PM 1/24/2003 +0100, you wrote: >On Mon, Jan 20, 2003 at 10:07:45AM +0100, Hans Hagen wrote: > > At 05:06 PM 1/18/2003 -0700, you wrote: > > >Greetings! > > > > > > Is it possible to have parts of the ConTeXt file > > >processed conditionally? I'm hoping to be able to do > > >something like: > > > > > >(in ConTeXt file) > > > > > >Question: What is the derivative of $e^{sqrt{x}}$\\ > > >\some-command-start > > >Answer: $\frac{d}{dx} e^{sqrt{x}} ... $ > > >\some-command-end > > > > >[...] > > > > \defineblock [answer] > > > >Interesting: Three of your users suggest using modes instead. I would >have too. well, nowadays there is setups as well (more on that in some new styles) >What made you choose blocks over modes here? (1) no argument grabbing and therefore catcode save, which means that verbatim and so will work (2) they keep track of numbering, so that when you call them up later (say in appendix) you can get similar numbers; say that you want a summary of formula's: put them in blocks, tag them (with optional arg you cna group them in subblocks), then, when you call such a subgroup you get proper numbers; also, refs in such recalled blocks know from which chapter/section/etc they come, so they will be prefixed accordingly (3) hooks and local variables (4) nesting is possible [btw a pretty old mechanism, one of the reasons for context being there] Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------