Am 26.06.2012 um 23:25 schrieb Marcin Borkowski:
Or is there a better way to do something like this?
It depends on what you want to do. You can create a buffer command:
\def\startamode{\grabbufferdata[amode][startamode][stopamode]} %\def\stopamode {\getbuffer[amode]}
\starttext
All modes. \startamode “A” mode. \stopamode
\stoptext
Thanks, it worked. One question: is there any difference between
\def\starta{...} \def\stopa{...}
and
\definestartstop[a][before={...},after={…}]
Yes because in my definition for \startamode I start a buffer which reads everything untill the delimiting \stopamode and stores it in memory, afterwards you can access the stored content with \getbuffer[…]. When you use \definestartstop to create the environment you have only two commands which perform a few things at the begin and end of the environment but you can do much with the content itself, the only way to gobble the content is to store it in a box but than the buffer method is easier. Wolfgang