> \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