From: Maggyero <maggyero@gmail.com>
To: ntg-context@ntg.nl
Subject: ConTeXt equivalent of \newmcodes@
Date: Mon, 27 Apr 2015 23:47:25 +0200 [thread overview]
Message-ID: <CAJ2CwZ1si5aO2Qw08LTAGoVbeukvgDv5UdqR93+=DhnSjV0RKQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 908 bytes --]
> \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
[-- Attachment #1.2: Type: text/html, Size: 1342 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 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 21:47 Maggyero [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-27 19:14 Maggyero
2015-04-27 20:44 ` Hans Hagen
2015-04-27 13:20 Maggyero
2015-04-27 13:55 ` Aditya Mahajan
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='CAJ2CwZ1si5aO2Qw08LTAGoVbeukvgDv5UdqR93+=DhnSjV0RKQ@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).