Re: [NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-13 Thread h h extern
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

[NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-11 Thread Gerben Wierda
I modeled this after the LaTeX sources because I had to move on: \newcommand{\ensuremath}[1]{\ifmmode\expandafter\FirtsOfOne% \else\expandafter\EnsuredMath\fi} \long\def\FirstOfOne#1{#1} \long\def\EnsuredMath#1{$\relax#1$} but is there a ConTeXt way of doing this? G

Re: [NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-11 Thread Nikolai Weibull
* Gerben Wierda (Mar 11, 2005 15:50): I modeled this after the LaTeX sources because I had to move on: \newcommand{\ensuremath}[1]{\ifmmode\expandafter\FirtsOfOne% \else\expandafter\EnsuredMath\fi} \long\def\FirstOfOne#1{#1} \long\def\EnsuredMath#1{$\relax#1$} but is there a ConTeXt way of

Re: [NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-11 Thread Gerben Wierda
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

Re: [NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-11 Thread Adam Lindsay
Gerben Wierda said this at Fri, 11 Mar 2005 16:54:38 +0100: But my way also doesn't work. I get empty output as a result of the \bit{b}{off} command. Help? This is probably not satisfying, because you probably want to get new mathematics commands working, but if this is to be used solely in

Re: [NTG-context] ConTeXt equivalent for \ensuremath?

2005-03-11 Thread Gerben Wierda
On Mar 11, 2005, at 18:20, Adam Lindsay wrote: Gerben Wierda said this at Fri, 11 Mar 2005 16:54:38 +0100: But my way also doesn't work. I get empty output as a result of the \bit{b}{off} command. Help? This is probably not satisfying, because you probably want to get new mathematics commands