From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91219 Path: news.gmane.org!not-for-mail From: Maggyero Newsgroups: gmane.comp.tex.context Subject: ConTeXt equivalent of \newmcodes@ Date: Mon, 27 Apr 2015 15:20:03 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0932535710==" X-Trace: ger.gmane.org 1430140861 19837 80.91.229.3 (27 Apr 2015 13:21:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Apr 2015 13:21:01 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 27 15:20:47 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ymixp-0004gX-5V for gctc-ntg-context-518@m.gmane.org; Mon, 27 Apr 2015 15:20:45 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5F81D1022F for ; Mon, 27 Apr 2015 15:20:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8AddrJ0Hwb-A for ; Mon, 27 Apr 2015 15:20:43 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 732B510240 for ; Mon, 27 Apr 2015 15:20:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BD7F8101FC for ; Mon, 27 Apr 2015 15:20:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id x1Q0-hRvat0d for ; Mon, 27 Apr 2015 15:20:06 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 13340101E8 for ; Mon, 27 Apr 2015 15:20:06 +0200 (CEST) Original-Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t3RDK49S028720 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 27 Apr 2015 15:20:05 +0200 Original-Received: by igbyr2 with SMTP id yr2so62122275igb.0 for ; Mon, 27 Apr 2015 06:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=DpGMA1tkWqW7Dp8/+ToLWttqet+mvOs651UhFR/fHX8=; b=1DutRWQLW+G89XG27Y+biT1OPPJifEE8dYD6invA0QxF3GPxCKjH40kcfHKtYnzgYc b3Jj4ak8xM4ZZzAxw3sqjDPZJnO2QsX/qBxJ+E3DnVqC7d+aUZYqdtrvzHnChzgfBB/H ujmVgrrkB4QPSez/4QY9I/OESXSIOwq5ad5U55aWzMk4Ctg10dl//cN9aRMAY1ZbMdUr aPiOGoYGZ4a5ej8W+ML608y8WCo3bxMJD/DyB0a0U6C2BHjlHj1aV2acXIVz4SCgeYE9 5e17Izz8XFvb0J70NCM5Yls696YELBQlOIrnhf8mo3ag8bXBtMjxBm6OwMipRSrVhyGT eIWQ== X-Received: by 10.107.138.130 with SMTP id c2mr13674371ioj.74.1430140803311; Mon, 27 Apr 2015 06:20:03 -0700 (PDT) Original-Received: by 10.36.65.80 with HTTP; Mon, 27 Apr 2015 06:20:03 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::230; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03Ol1k5bp - 1cfe76b14835 - 20150427 (trained as not-spam) Received-SPF: pass (filter3-ams.mf.surf.net: domain of maggyero@gmail.com designates 2607:f8b0:4001:c05::230 as permitted sender) receiver=filter3-ams.mf.surf.net; client-ip=2607:f8b0:4001:c05::230; envelope-from=; helo=mail-ig0-x230.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:91219 Archived-At: --===============0932535710== Content-Type: multipart/alternative; boundary=001a113f284e8f6cf40514b49a42 --001a113f284e8f6cf40514b49a42 Content-Type: text/plain; charset=UTF-8 > 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 --001a113f284e8f6cf40514b49a42 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> do you have an example of usage

Ye= s, I am trying to create the command \operatorname in ConTeXt. I know that = in LaTeX \operatorname{xyz} is equivalent to

\math= op{\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 Co= nTeXt:

\mathop{\newmcodes@\kern\zeropoint\mfunctio= n{xyz}}\nolimits

but \newmcodes@ produces an e= rror.=C2=A0

In LaTeX, \newmcodes@ is defined as

\begingroup \catcode`\"=3D12
=C2= =A0 =C2=A0 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\.&qu= ot;613A%
=C2=A0 =C2=A0 \ifnum\mathcode`\-=3D45 \else
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 \mathchardef\std@minus\mathcode`\-\relax
<= div>=C2=A0 =C2=A0 \fi
=C2=A0 =C2=A0 \mathcode`\-45\mathcode`\/47\= mathcode`\:"603A\relax}
\endgroup

=
according to the AMSopn package, so I have copied the code in my docum= ent (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 i= f condition).

I also know that there is the ConTeX= t command \definemathcommand[nolop]{xyz} which I thought stands as an equiv= alent 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 wo= uld like to have a \DeclareMathOperator in ConTeXt, so here are my 2 questi= ons:
1. What is the ConTeXt equivalent of \newmcodes@?
= 2. What is the point of \definemathcommand?


Maggyero=
--001a113f284e8f6cf40514b49a42-- --===============0932535710== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0932535710==--