From: Hans Hagen Outside <pragma@wxs.nl>
Subject: Re: Collecting command arguments in a startstop environment
Date: Mon, 02 Aug 2004 22:14:07 +0200 [thread overview]
Message-ID: <410EA08F.40004@wxs.nl> (raw)
In-Reply-To: <4.3.1.2.20040802103535.01618f00@cits1.stanford.edu>
Brooks Moses wrote:
> To answer my own question:
>
> At 10:39 PM 8/1/2004, I wrote:
>
>> 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?
>
>
> The \grabuntil and \processbetween commands, as defined in
> syst-ext.tex, do exactly what I'm asking for.
If you want to play with low level features, it makes sense to look into:
syst-gen.tex
syst-ext.tex
(syst-new.tex)
supp-box.tex
supp-fun.tex
the interfaces of syst/supp modules are sort of 'public' and stable. These modules may also teach some tex tricks -)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
prev parent reply other threads:[~2004-08-02 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-02 5:39 Brooks Moses
2004-08-02 8:37 ` Patrick Gundlach
2004-08-02 8:46 ` Brooks Moses
2004-08-02 17:43 ` Brooks Moses
2004-08-02 20:14 ` Hans Hagen Outside [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=410EA08F.40004@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).