# [NTG-context] problem with \getparameters

Thu Feb 23 12:27:35 CET 2012

Am 23.02.2012 um 09:05 schrieb Thomas A. Schmitz:

> Hi all,
>
> I'm trying to use \getparameters, but I'm doing it wrong. What I want to do is: define an environment which starts linenumbering and takes a key=value argument to define the start of the numbers. Here's what I tried (I also tried a few other things, such as \setvariables, but wasn't any more successful):
>
> \definestartstop[mynumberedblockquote]
> 		[before={\blank[line]
> 			\setupindenting[no]
> 			\setuplinenumbering[width=1cm,start=\getvalue{testsetupsstart}]
> 			\startlinenumbering},
> 	          after={\stoplinenumbering
> 			\setupindenting[yes]
> 			{\blank[line]}
> 	                \par}]
>
> \def\startnumberedblockquote#1[#2]%
>  {\getparameters[testsetups][start=1,#2]%
>   \startmynumberedblockquote}
>
> \define\stopnumberedblockquote%
>   {\stopmynumberedblockquote}

\usemodule[annotation]

\define[2]\NumberedblockquoteCommand
{\setupindenting[no]
\startlinenumbering[width=1cm][\annotationparameter{start}]%
#2%
\stoplinenumbering}

\defineannotation
[numberedblockquote]
[alternative=command,
%indenting=no,
command=\NumberedblockquoteCommand]

Wolfgang