[NTG-context] \definemathcommand lowers the text

Aditya Mahajan adityam at umich.edu
Thu Aug 18 21:08:48 CEST 2016


On Wed, 17 Aug 2016, Mikael P. Sundqvist wrote:

> Hi!
>
> look at the output of this (attached)
>
> \definemathcommand [D] [nolop] {\mfunction{D}}
> \starttext
> Compare $\D f$ with $\mfunction{D}f$.
> \stoptext
>
> In the \D, the D is lowered a bit. I think it should not be, or else I
> misuse something. If so, how should I define my own operator (I found
> this example on the wiki).

This is a "feature" of \mathop.

\definemathcommand [D] [nolop] {\mfunction{D}}
\starttext
Compare $\D f$ with $\mfunction{D}f$ and $\mathop{\mfunction{D}}f$.
\stoptext

If the argument of \mathop is a single character, \mathop centers the 
glyph on the math axis (This is useful for \sum, \int, \prod, etc.). To 
circumvent this, use:

\definemathcommand [D] [nolop] {\mfunction{D}\kern\zeropoint}

Aditya


More information about the ntg-context mailing list