# [dev-context] A few questions

Hans Hagen pragma at wxs.nl
Fri Aug 7 12:02:23 CEST 2009

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

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%
>      \long\expandafter\def\csname
> list:\number\commalistdepth\endcsname##1{#2}%
>      \def\currentcommalistcommand{\csname
> list:\number\commalistdepth\endcsname}%
>      \processcommalist[#1]\currentcommalistcommand
>
>
> \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

-----------------------------------------------------------------