From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33032 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: creating environments Date: Tue, 30 Jan 2007 10:05:23 -0500 (EST) Message-ID: References: <20070129132113.06a4e2ba.schuster.wolfgang@googlemail.com> <20070130140124.bcd02a27.schuster.wolfgang@googlemail.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: sea.gmane.org 1170174420 17059 80.91.229.12 (30 Jan 2007 16:27:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2007 16:27:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 30 17:26:52 2007 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 1HBvmi-0003Pi-M6 for gctc-ntg-context-518@m.gmane.org; Tue, 30 Jan 2007 17:24:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 708A61FAC5; Tue, 30 Jan 2007 17:24:29 +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 20367-06-2; Tue, 30 Jan 2007 17:24:09 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AD9637B; Tue, 30 Jan 2007 16:09:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4E6837B for ; Tue, 30 Jan 2007 16:09:15 +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 15483-01 for ; Tue, 30 Jan 2007 16:09:09 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id DB9E774 for ; Tue, 30 Jan 2007 16:05:15 +0100 (CET) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY hellskitchen.mr.itd.umich.edu ID 45BF5EB3.2A45C.27458 ; 30 Jan 2007 10:05:23 -0500 In-Reply-To: <20070130140124.bcd02a27.schuster.wolfgang@googlemail.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:33032 Archived-At: On Tue, 30 Jan 2007, Wolfgang Schuster wrote: > On Mon, 29 Jan 2007 10:15:34 -0500 (EST) > Aditya Mahajan wrote: > >> On Mon, 29 Jan 2007, Wolfgang Schuster wrote: >> >>> Hi all, >>> >>> >>> I have a module with a envrionment defined in the following way: >>> >>> \def\startFOO#1\stopFOO{...#1...} >>> >>> >>> I try currently to write a command \defineFOO[MYFOO] that expands to my >>> already created environment. >>> >>> \startMYFOO#1\stopMYFOO -> \startFOO#1\stopFOO >>> >>> >>> I know it is possible to make this in the following way: >>> >>> \def\startMYFOO#1\stopMYFOO{\startFOO#1\stopFOO} >>> >>> but this not what I want. >> >> Something like this >> >> \def\defineFOO[#1]% >> {\setvalue{\c!start#1}{\startFOO} >> \setvalue{\c!stop#1} {\stopFOO}} >> > > Hi Aditya, > > > this can only be used if you define your environment in this way: > > \def\startFOO{...} > \def\stopFoo{...} > > > I defined my environment in this way: > > \def\startFOO#1\stopFOO{...} > > This means TeX reads everything from \startFOO till \stopFOO and looks > afterwards at the replacement text. I am not sure how something like that you work. > I used tried the first way with saving the content into a buffer and > using the buffer content. If you want to write to a buffer and later use it, there are low level macros to define your own buffer commands. Have a look at the R module to see an example. Depending on your usage, you will have to keep track of the buffer numbers on your own. Aditya