[NTG-context] Working with conditionals

luigi scarso luigi.scarso at gmail.com
Mon Jan 3 11:08:00 CET 2011


On Mon, Jan 3, 2011 at 11:05 AM, luigi scarso <luigi.scarso at gmail.com> wrote:
> You can also use a key/value approach, which is more flexible
>
> \unprotect
> \def\Title[#1]{
>  \getparameters[CecWes@@][param1={default},param2={default2},
> param3={default3},#1]
>  \testpage[10]
>  \startalignment[center]
>  {
>     \blank[2*big]
>     \switchtobodyfont[1.5em]
>     \bf\em\getvalue{CecWes@@param1}
>  }
>  \blank
>  \stopalignment
> }
> \protect
>
>
> \starttext
> ....
> %% param1= FOO, param2=BOO, param3=default3
> %% the order is not important
> \Title[param2={BOO},param1={BOO}]
sorry, typo                                ^^^
> \Title[param2={BOO},param1={FOO}]

-- 
luigi


More information about the ntg-context mailing list