Hello Wolfgang,


Thanks.


\def\comm{\thinspace\groupedcommand\tt\thinspace}

 works quite well.


From a newbie standpoint, I wonder why replacing \thinspace with \hspace[medium] fails?


(I had another version

 \def\comm#1{\hspace[medium]{\tt#1}\hspace[medium]}

it worked.)


Vystcheslav




> On Sun, 1 Apr 2007 15:40:50 +0300

> Vyatcheslav Yatskovsky <yatskovsky@gmail.com> wrote:


>> Hello Taco,


>> Thanks, I came up with the following


>> \def\comm#1{{\tt#1}\,}


>> \starttext

>> The \comm{rand} function generates pseudo-random numbers.

>> \stoptext


>> I quite satisfied with it, but maybe there is better way to typeset

>> programming keywords?


>> Best regards,

>> Vyatcheslav Yatskovsky



> There is a better way to define such a command in ConTeXt.


> \def\comm

>   {\groupedcommand\tt\thinspace}


> \starttext


> The \comm{rand} function generates pseudo-random numbers.


> The {\comm rand} function generates pseudo-random numbers.


> \stoptext


> Wolfgang



-- 

Best regards,

Vyatcheslav Yatskovsky