Wolfgang Schuster wrote:

not very nice and don't look pleasant to me

sure, but a pleasant solution takes me more time -)

i get the feeling we're moving towards latex3 (brr), before this happens drop the whole
thing and i don't like \getvariable in this context anyway

there was a presentation about this ltx3 low level syntax and i definitely don't want to have something like that; it's more that in context we have this system of [optional]{whatever} that we might want to support

  \long\def\processcommalistwithcontent[#1]#2%
    {\def\currentcommalistcommand##1{#2}%
     \processcommalist[#1]\currentcommalistcommand}

\processcommalistwithcontent[a,b,c]{{\processcommalistwithcontent[x,y,z]{This is subelement ##1 of element #1.\par}}}

but the extra pair of braces is kind of akward. Working without them is not the problem

  \newcount\commalistdepth

  \long\def\processcommalistwithcontent[#1]#2%
    {\advance\commalistdepth\plusone
\long\expandafter\def\csname list:\number\commalistdepth\endcsname##1{#2}% \def\currentcommalistcommand{\csname list:\number\commalistdepth\endcsname}%
     \processcommalist[#1]\currentcommalistcommand
     \advance\commalistdepth\minusone}

\processcommalistwithcontent[a,b,c]{\processcommalistwithcontent[x,y,z]{This is subelement ##1 of element #1.\par}}

but as you mentioned above some kind of check (depth counter) is needed.

right

in my games module for the input for chess, go ...

  \startpgnsetups move
  do a few things before the move
  \pgnflush{#1}
  do a few things after the move
  \stoppgnsetups

well, maybe something like

\starttexsetups move
 do a few things before the move
 \pgnflush{#1}
 do a few things after the move
\stoptexsetups

as generic case?

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
-----------------------------------------------------------------
_______________________________________________
dev-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to