[NTG-context] ConTeXt equivalent of \newmcodes@

Maggyero maggyero at gmail.com
Mon Apr 27 23:47:25 CEST 2015


> \definemathcommand[xyz][nolop]{\text{fancy-function-name'*.:}}

The problem with this solution is that the font of the operator becomes the
normal text font whereas I want to use the standard math upright font (so
\mfunction + \kern\zeropoint + \newmathcodes is the way to go). For
instance with \setupbodyfont[sansserif] the operator name becomes sans
serif, which I don't want.

I only need to make this code compile:

\begingroup \catcode`\"=12
    \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A%
    \ifnum\mathcode`\-=45 \else
        \mathchardef\std at minus\mathcode`\-\relax
    \fi
    \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax}
\endgroup

\definemathcommand[xyz][nolop]{\newmcodes@
\kern\zeropoint\mfunction{fancy-function-name'*.:}}

\starttext
\xyz
\stoptext

How can I do that? The compilation fails at the \ifnum condition. Isn't
\ifnum a ConTeXt macro?


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


More information about the ntg-context mailing list