[NTG-context] Working with conditionals

2011-01-03 Thread Cecil Westerhof
I have the folowing function for a title: \def\Title[#1]{ \testpage[10] \startalignment[center] { \blank[2*big] \switchtobodyfont[1.5em] \bf\em#1 } \blank \stopalignment } What I would like is that there is an optional second parameter. When it is there, it is used

Re: [NTG-context] Working with conditionals

2011-01-03 Thread Vianney le Clément
\def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{ \ifsecondargument \testpage[#2] \else \testpage[10] \fi \startalignment[center] { \blank[2*big] \switchtobodyfont[1.5em] \bf\em#1 } \blank \stopalignment } Vianney On Mon, Jan 3, 2011 at 10:46, Cecil

Re: [NTG-context] Working with conditionals

2011-01-03 Thread luigi scarso
2011/1/3 Vianney le Clément vleclem...@gmail.com: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{  \ifsecondargument     \testpage[#2]  \else     \testpage[10]  \fi  \startalignment[center]  {     \blank[2*big]     \switchtobodyfont[1.5em]     \bf\em#1  }  \blank  

Re: [NTG-context] Working with conditionals

2011-01-03 Thread luigi scarso
On Mon, Jan 3, 2011 at 11:05 AM, luigi scarso luigi.sca...@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]  

Re: [NTG-context] Working with conditionals

2011-01-03 Thread Cecil Westerhof
2011/1/3 Vianney le Clément vleclem...@gmail.com: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{  \ifsecondargument     \testpage[#2]  \else     \testpage[10]  \fi  \startalignment[center]  {     \blank[2*big]     \switchtobodyfont[1.5em]     \bf\em#1  }  \blank