did not help in your case,
> something like LaTeXs \newenvironment, I wrote a simple version below.
>
> \unprotect
>
> \def\ev{ev}
>
> \def\environmentparameter#1%
> {\csname\ev\currentenvironment#1\endcsname}
>
> \def\defineenvironment
> {\dodoubleemp
ronmentparameter#1%
{\csname\ev\currentenvironment#1\endcsname}
\def\defineenvironment
{\dodoubleempty\dodefineenvironment}
\def\dodefineenvironment[#1][#2]%
{\getparameters
[\ev#1]
[\c!before=,
\c!after=,
#2]%
\setvalue{\e!start#1}{\dodoubleempty\dostartenvi
On Fri, 14 Nov 2008, Alan STONE wrote:
> Another debugging question: how do you return the filename of the file being
> compiled ?
\jobname
There is also
\currentproject
\currentproduct
\currentenvironment
\currentcomponent
efile\doexecutefile#1\\}
\def\startenvironment #1 %
{\donextlevel\v!environment\currentenvironment
\donotexecutefile\doexecutefileonce
\donotexecutefile\donotexecutefile#1\\}
\protect
\starttext
% \startproject test
% 1: \startmode[*project] project \stopmode \endgraf
% 2: \startmode[*pr