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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to