Gerben Wierda wrote:
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}}}}
you now say something like <text>_\hbox and since _ kind of takes an argument, it gets an hbox only; you need <text>_{\hbox{..}} as in: \def\bit#1#2{\mathematics{\hbox{\tf#1}_{\hbox{\tf#2}}}} \bit{1}{2} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------