ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definemathcommand lowers the text
@ 2016-08-17  8:55 Mikael P. Sundqvist
  2016-08-18 19:08 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael P. Sundqvist @ 2016-08-17  8:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

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).

/Mikael

[-- Attachment #2: ctx-example2.pdf --]
[-- Type: application/pdf, Size: 7428 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \definemathcommand lowers the text
  2016-08-17  8:55 \definemathcommand lowers the text Mikael P. Sundqvist
@ 2016-08-18 19:08 ` Aditya Mahajan
       [not found]   ` <CAHy-LL_AQXPcebBZn4zXj9b12krBvD2eP932FLg0zkpCTL_rQg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2016-08-18 19:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \definemathcommand lowers the text
       [not found]   ` <CAHy-LL_AQXPcebBZn4zXj9b12krBvD2eP932FLg0zkpCTL_rQg@mail.gmail.com>
@ 2016-08-18 19:25     ` Mikael P. Sundqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael P. Sundqvist @ 2016-08-18 19:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1493 bytes --]

Den 18 aug. 2016 9:09 em skrev "Aditya Mahajan" <adityam@umich.edu>:
>
> 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
>
___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
the Wiki!
>
> maillist : ntg-context@ntg.nl /
http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
___________________________________________________________________________________

Thank you very much for the clear explanation and neat work-around, Aditya.

/Mikael

[-- Attachment #1.2: Type: text/html, Size: 2231 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-18 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17  8:55 \definemathcommand lowers the text Mikael P. Sundqvist
2016-08-18 19:08 ` Aditya Mahajan
     [not found]   ` <CAHy-LL_AQXPcebBZn4zXj9b12krBvD2eP932FLg0zkpCTL_rQg@mail.gmail.com>
2016-08-18 19:25     ` Mikael P. Sundqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).