[NTG-context] ConTeXt equivalent of \newmcodes@

Maggyero maggyero at gmail.com
Mon Apr 27 21:14:15 CEST 2015

> Does \definemathcommand [xyz] [nolop] {xyz} do what you want?

Not really if, instead of xyz, I want a name with hyphens, quotes, stars or
colons. Compare the output of


in ConTeXt with the output of


in LaTeX. What I can do is


which gives the same result as \DeclareMathOperator, except for the hyphens
and the star are converted into binary operators and the colon which is
preceded by a space, since I didn't use \newmcodes@, that is why I asked
how to implement the macro \newmcodes@ in ConTeXt, which is defined in
LaTeX as

\begingroup \catcode`\"=12
    \ifnum\mathcode`\-=45 \else
        \mathchardef\std at minus\mathcode`\-\relax

so that the following code can compile in ConTeXt:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150427/2d4785d5/attachment.html>

More information about the ntg-context mailing list