On Mar 11, 2005, at 15:57, Nikolai Weibull wrote:
\newcommand{\ensuremath}[1]{\ifmmode\expandafter\FirtsOfOne% \else\expandafter\EnsuredMath\fi} \long\def\FirstOfOne#1{#1} \long\def\EnsuredMath#1{$\relax#1$} \newcommand{\bit}[2]{\ensuremath{\hbox{\tf #1}_\hbox{\tf #2}}}
but is there a ConTeXt way of doing this?
\mathematics{...}, nikolai
Replacing \ensuremath above with \mathematics gives an error (both attempts):
\newcommand{\bit}[2]{\mathematics{\hbox{\tf #1}_\hbox{\tf #2}}} \newcommand{\bit}[2]{\mathematics{{\hbox{\tf #1}_\hbox{\tf #2}}}}
! Missing { inserted. <to be read again> \hbox <argument> \hbox {\tf b}_\hbox {\tf off} \mathematics #1->\relax \ifmmode #1\else $#1 $\fi l.53 ...er off or on, lets call these \bit{b}{off} and
But my way also doesn't work. I get empty output as a result of the \bit{b}{off} command. Help? G