From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33026 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: creating environments Date: Tue, 30 Jan 2007 14:01:24 +0100 Message-ID: <20070130140124.bcd02a27.schuster.wolfgang@googlemail.com> References: <20070129132113.06a4e2ba.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 1170162141 31102 80.91.229.12 (30 Jan 2007 13:02:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2007 13:02:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 30 14:02:18 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 1HBscr-0003a9-Vs for gctc-ntg-context-518@m.gmane.org; Tue, 30 Jan 2007 14:02:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9C19C42; Tue, 30 Jan 2007 14:02:08 +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 02811-05; Tue, 30 Jan 2007 14:02:02 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DD7383B; Tue, 30 Jan 2007 14:02:01 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E40EE3B for ; Tue, 30 Jan 2007 14:01:58 +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 05053-01-2 for ; Tue, 30 Jan 2007 14:01:50 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by ronja.ntg.nl (Postfix) with ESMTP id F0D9335 for ; Tue, 30 Jan 2007 14:01:48 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id k27so164163nfc for ; Tue, 30 Jan 2007 05:01:57 -0800 (PST) Original-Received: by 10.49.34.17 with SMTP id m17mr691838nfj.1170162108065; Tue, 30 Jan 2007 05:01:48 -0800 (PST) Original-Received: from eve ( [194.94.240.124]) by mx.google.com with ESMTP id q28sm2068628nfc.2007.01.30.05.01.47; Tue, 30 Jan 2007 05:01:47 -0800 (PST) In-Reply-To: X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.7; i686-pc-mingw32) 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:33026 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 used tried the first way with saving the content into a buffer and using the buffer content. This did no longer work when you try to write: \placefloat {\startFOO ... \stopFOO} or \starcombination[...] {\startFOO ... \stopFOO} {} ... \stopcombination Wolfgang