From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15879 Path: main.gmane.org!not-for-mail From: Brooks Moses Newsgroups: gmane.comp.tex.context Subject: Collecting command arguments in a startstop environment Date: Sun, 01 Aug 2004 22:39:22 -0700 Sender: ntg-context-bounces@ntg.nl Message-ID: <4.3.1.2.20040801223158.00b48988@cits1.stanford.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1091425154 4044 80.91.224.253 (2 Aug 2004 05:39:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2004 05:39:14 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 02 07:39:07 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BrVXP-0005FV-00 for ; Mon, 02 Aug 2004 07:39:07 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8EA7C12793; Mon, 2 Aug 2004 07:39:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16387-03; Mon, 2 Aug 2004 07:39:04 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CC0411278D; Mon, 2 Aug 2004 07:39:03 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6A2971278D for ; Mon, 2 Aug 2004 07:39:02 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16130-09 for ; Mon, 2 Aug 2004 07:39:01 +0200 (CEST) Original-Received: from smtp3.Stanford.EDU (unknown [171.67.16.138]) by ronja.ntg.nl (Postfix) with ESMTP id 8FFAF12784 for ; Mon, 2 Aug 2004 07:39:01 +0200 (CEST) Original-Received: from Brooks1.stanford.edu (DNab42a4a9.Stanford.EDU [171.66.164.169]) by smtp3.Stanford.EDU (8.12.11/8.12.11) with ESMTP id i725cwRZ020026 for ; Sun, 1 Aug 2004 22:38:59 -0700 X-Sender: brooks@cits1.stanford.edu X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Original-To: ConTeXt users list X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:15879 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15879 There's a nice little problem that arises in LaTeX, of wanting to write a bit of code like the following, to define an environment that passes the contents of the environment to a command as an argument: \newcommand{\foo}[1]{...} \newenvironment{fooenv}{% \foo\bgroup }{% \egroup } There's even a nice FAQ entry about this. [1] As it turns out, the amsmath package defines a handy \collect@body command that handles collecting the environment body to pass it to a command. Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course replacing \newenvironment with \definestartstop. Is there by any chance a built-in ConTeXt macro that can do this? Or even things that would make a decent foundation for building such a thing? Thanks much, - Brooks [1] http://www.tex.ac.uk/cgi-bin/texfaq2html?label=cmdasenv