From: Maggyero <maggyero@gmail.com>
To: ntg-context@ntg.nl
Subject: ConTeXt equivalent of \newmcodes@
Date: Mon, 27 Apr 2015 15:20:03 +0200 [thread overview]
Message-ID: <CAJ2CwZ0hirpaUDKpeXLU-7vpJpHQQNVgREJs_d6WCP+g3ssp=g@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1573 bytes --]
> do you have an example of usage
Yes, I am trying to create the command \operatorname in ConTeXt. I know
that in LaTeX \operatorname{xyz} is equivalent to
\mathop{\newmcodes@\kern\z@\operator@font xyz}\csname nolimits@\endcsname}
according to the AMSopn package (
http://www.bakoma-tex.com/doc/latex/amsmath/amsopn.pdf), and I am trying to
translates that in ConTeXt:
\mathop{\newmcodes@\kern\zeropoint\mfunction{xyz}}\nolimits
but \newmcodes@ produces an error.
In LaTeX, \newmcodes@ is defined as
\begingroup \catcode`\"=12
\gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A%
\ifnum\mathcode`\-=45 \else
\mathchardef\std@minus\mathcode`\-\relax
\fi
\mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax}
\endgroup
according to the AMSopn package, so I have copied the code in my document
(I only removed the @ so that I don't have to convert its catcode) but the
if condition gives an error (however it compiles fine without the if
condition).
I also know that there is the ConTeXt command
\definemathcommand[nolop]{xyz} which I thought stands as an equivalent to
the \operatorname wrapper \DeclareMathOperator, but apparently not since it
doe not use the 3 commands
1. \newmcodes@
2. \kern\z@
3. \operator@font
in it, so I wonder the point of such a wrapper since all it seems it does
is translates to
\mathop{xyz}\nolimits
To sum up, I would like to have a \DeclareMathOperator in ConTeXt, so here
are my 2 questions:
1. What is the ConTeXt equivalent of \newmcodes@?
2. What is the point of \definemathcommand?
Maggyero
[-- Attachment #1.2: Type: text/html, Size: 2224 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
___________________________________________________________________________________
next reply other threads:[~2015-04-27 13:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 13:20 Maggyero [this message]
2015-04-27 13:55 ` Aditya Mahajan
-- strict thread matches above, loose matches on Subject: below --
2015-04-27 21:47 Maggyero
2015-04-27 19:14 Maggyero
2015-04-27 20:44 ` Hans Hagen
2015-04-26 22:13 Maggyero
2015-04-27 7:37 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ2CwZ0hirpaUDKpeXLU-7vpJpHQQNVgREJs_d6WCP+g3ssp=g@mail.gmail.com' \
--to=maggyero@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).