Hi. When writing math I like avoiding $ whenever possible by defining my math operators with \mathematics, e.g. \def\grp{\mathematics{G}}. So far I was using this like I use \EnsureMath in LaTeX, but now I'm running into problems in MPgraphics: Texexec compiles the following file fine until I add the paragraph called "Math in Math in MP". There it seems to somehow choke on too many $ and \relax. Is there a better way to do such definitions? Thanks, Boris. PS: There's already a problem in the second to last paragraph where the G is not set in math mode any more. The example file: \def\grp{\mathematics{G}} \starttext Test. Running text: A group \grp Math: $\grp$ $\grp_{\grp}$ Text in MP: \startusableMPgraphic{groupone} label(textext("\grp"),origin) ; \stopusableMPgraphic \useMPgraphic{groupone} Math in MP: \startusableMPgraphic{grouptwo} label(textext("\mathematics{\grp}"),origin) ; \stopusableMPgraphic \useMPgraphic{grouptwo} Math in Math in MP: \startusableMPgraphic{groupthree} label(textext("\mathematics{\grp_{\grp}}"),origin) ; \stopusableMPgraphic \useMPgraphic{groupthree} \stoptext
Boris Tschirschwitz wrote:
Hi.
When writing math I like avoiding $ whenever possible by defining my math operators with \mathematics, e.g. \def\grp{\mathematics{G}}. So far I was using this like I use \EnsureMath in LaTeX, but now I'm running into problems in MPgraphics: Texexec compiles the following file fine until I add the paragraph called "Math in Math in MP". There it seems to somehow choke on too many $ and \relax.
Is there a better way to do such definitions?
I've changed my local definition of \mathematics to: \unexpanded\long\def\mathematics#1% {\relax\ifmmode#1\else $#1$\fi} And that works nicely. Cheers, Taco
Cool, it works nicely here, too.
Thanks,
Boris.
On 8/14/06, taco hoekwater
Boris Tschirschwitz wrote:
Hi.
When writing math I like avoiding $ whenever possible by defining my math operators with \mathematics, e.g. \def\grp{\mathematics{G}}. So far I was using this like I use \EnsureMath in LaTeX, but now I'm running into problems in MPgraphics: Texexec compiles the following file fine until I add the paragraph called "Math in Math in MP". There it seems to somehow choke on too many $ and \relax.
Is there a better way to do such definitions?
I've changed my local definition of \mathematics to:
\unexpanded\long\def\mathematics#1% {\relax\ifmmode#1\else $#1$\fi}
And that works nicely.
Cheers, Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (2)
-
Boris Tschirschwitz
-
taco hoekwater