From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97463 Path: news.gmane.org!.POSTED!not-for-mail From: Antoine Cailliau Newsgroups: gmane.comp.tex.context Subject: Re: Formula numbering conversion Date: Thu, 2 Mar 2017 07:59:03 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5768893415692111587==" X-Trace: blaine.gmane.org 1488437993 32719 195.159.176.226 (2 Mar 2017 06:59:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Mar 2017 06:59:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 02 07:59:48 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjKiJ-0007lo-AQ for gctc-ntg-context-518@m.gmane.org; Thu, 02 Mar 2017 07:59:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0FA57838B2; Thu, 2 Mar 2017 07:59:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gYNb4AOGeRXf; Thu, 2 Mar 2017 07:59:38 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 37676838B3; Thu, 2 Mar 2017 07:59:38 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 865AD838B1 for ; Thu, 2 Mar 2017 07:59:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UCQN64wN0H72 for ; Thu, 2 Mar 2017 07:59:36 +0100 (CET) Original-Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1CB24838AD for ; Thu, 2 Mar 2017 07:59:25 +0100 (CET) Original-Received: by mail-io0-f178.google.com with SMTP id z13so2832804iof.2 for ; Wed, 01 Mar 2017 22:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=av08GunZxJYDkNFQ761Hkuq1YYZlq4yWsAIWG8d+r3c=; b=AdKhkrkktEnxEzCNAeBM16TqIYRXDef8i1VI7NEigjLE91ljlm+4pI9UoNglGgNzjn OimAtyxq2gJOmi0N/DfoWespq85/yVknHxtvc16OyWHgaTO+Qxm8J+LCGQA9NOdCA8Sq jAmfhHn08Hbld/hX+5KmG7nqJ0e73fLmxzgeY2CJgl7WUpLuDqux0edQVfG+pRrp3rOu lYTp4ZJWaQhL1oUBXkXGcOoZPaIod3f0NNlFZu+pla/5eg4igyjFFGafOd5G//qq1TfC nMPqn5Xj84fLZTBAyjKwtEV2pRYJMZfcdNo75rAqKTV2AIj+b89YFG+4Wg89uiaqOK04 3/2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=av08GunZxJYDkNFQ761Hkuq1YYZlq4yWsAIWG8d+r3c=; b=nxk6lmHycuLMDbHlwsQwfqDpioAIvtO//nXACl8Nfjh3Jj28ifta/vWe7647MvHIGY shFQVcQr0ip2DczV1ktDzA0/kK8T84I7Gu5S+/B/q1GSq3f36xSpHVlKgO7GpWUmLWYh 8Va4zkZAB948o5vtD9WuRBnouHfnsMLd0/DxbrSoIxlCQGm+i/JvTH3v7Ta41WsYB9eG 9+o3Wes9T8NzRKNq+mCfoWYs+mNknmFH5JHmozMDMQ//Hcu/eEIE7y+buE61hT/cjsaZ b+xW+VQsTbVUlyG4M8BcL/+Uwxwji/DnvsmDCGQQTAhg0fTYWkJiucMcEKldayjJ7BmK VkHQ== X-Gm-Message-State: AMke39kIEXpV0tVsTe+dhHbIlXMY6tdjdsEZ0n8guYSlEAyBz8VxX2Dsmgth5e4mvy2tcXuPHvJbjgQoOVXQPw== X-Received: by 10.107.32.144 with SMTP id g138mr11870223iog.234.1488437964175; Wed, 01 Mar 2017 22:59:24 -0800 (PST) Original-Received: by 10.107.133.31 with HTTP; Wed, 1 Mar 2017 22:59:03 -0800 (PST) In-Reply-To: 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:97463 Archived-At: --===============5768893415692111587== Content-Type: multipart/alternative; boundary=001a11418fde2000b80549b9f836 --001a11418fde2000b80549b9f836 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Does anyone have a tip for me? I really want these tags in my document. Many thanks in advance, On 27 February 2017 at 19:22, Antoine Cailliau wrote: > I try to replicate the following : https://mailman.ntg.nl/ > pipermail/ntg-context/2006/021038.html (i.e. the equivalent of \tag in > latex/amsmath). More precisely this: > >> %------------------------8<-------------------------- >> \def\placeformulatag% >> {\dosingleempty\doplaceformulatag} >> \def\doplaceformulatag[#1]#2% >> {\let\normalstopformula\stopformula >> \def\stopformula% >> {\normalstopformula >> \restorenumber[formula] >> \egroup >> \let\stopformula\normalstopformula} >> \bgroup >> \savenumber[formula] >> \def\dummyconversion##1{#2} >> \defineconversion[dummyconversion][\dummyconversion] >> \setupformulas[conversion=3Ddummyconversion] >> \placeformula[#1]} >> >> \starttext >> \placeformulatag[tag]{test} \startformula >> E =3D mc^2 >> \stopformula >> See \in formula[tag] for a tagged formula >> \stoptext >> %----------------------------8<------------------------- > > > However, the following (simpler) code produce an "Undefined control > sequence" when using \in command. > > \starttext >> { >> \def\a#1{test} >> \defineconversion[a][\a] >> \setupformulae[numberconversion=3Da] >> \placeformula[test] >> \startformula E =3D mc^2 \stopformula >> } >> This is my reference: \in{formula}[test]. >> \stoptext > > > The following code, does not produce the error, but is not practical for > the reproducing the \tag command. > >> >> \starttext >> { >> \def\a#1{test} >> \defineconversion[a][\a] >> \setupformulae[numberconversion=3Da] >> \placeformula[test] >> \startformula E =3D mc^2 \stopformula >> This is my reference: \in{formula}[test]. >> } >> \stoptext > > > What am I doing wrong? I guess the command \a is no longer defined when > the compiler hit \in but how can I ensure that such local definition stay > accessible ? > > Thank you in advance, > > Antoine C. > > > On 27 February 2017 at 17:28, Antoine Cailliau > wrote: > >> Thanks. >> >> I updated the wiki. >> >> On 27 February 2017 at 17:18, Pablo Rodriguez wrote: >> >>> On 02/27/2017 04:55 PM, Antoine Cailliau wrote: >>> > The following code is documented to change the numbering of the >>> equations. >>> > However, this still use numerals for the equations. >>> > [...] >>> > Is this a bug ? Is it the correct way to change the numbering ? >>> >>> Hi Antoine, >>> >>> it=E2=80=99s numberconversion (as it reads in =E2=80=9CConTeXt Commands= =E2=80=9D): >>> >>> \setupformulas[numberconversion=3Dgreek] >>> \setupbodyfont[dejavu] >>> \starttext >>> \placeformula[test] >>> \startformula E =3D mc^2 \stopformula >>> \stoptext >>> >>> BTW, if this is wrong documented in the wiki, please correct it for >>> future reference. >>> >>> Pablo >>> -- >>> http://www.ousia.tk >>> ____________________________________________________________ >>> _______________________ >>> 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/list >>> info/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ____________________________________________________________ >>> _______________________ >> >> >> > --001a11418fde2000b80549b9f836 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Does anyone have a tip for me? I really want these tags in= my document.

Many thanks in advance,

On 27 February 2017 at 1= 9:22, Antoine Cailliau <antoinecailliau@gmail.com> w= rote:
I try to replicate= the following : https://mailman.ntg.nl/pipermail/ntg= -context/2006/021038.html (i.e. the equivalent of \tag in latex/am= smath). More precisely this:
%------------------------8<--------------------------
\d= ef\placeformulatag%
=C2=A0 =C2=A0{\dosingleempty\doplaceformulatag}=
\def\doplaceformulatag[#1]#2%
=C2=A0 =C2=A0{\let\normalstopformula\<= wbr>stopformula
=C2=A0 =C2=A0 \def\stopformula%
=C2=A0 =C2=A0 =C2=A0{= \normalstopformula
=C2=A0 =C2=A0 =C2=A0 \restorenumber[formula]
=C2= =A0 =C2=A0 =C2=A0 \egroup
=C2=A0 =C2=A0 =C2=A0 \let\stopformula\nor= malstopformula}
=C2=A0 =C2=A0 =C2=A0 \bgroup
=C2=A0 =C2=A0 =C2=A0 \sa= venumber[formula]
=C2=A0 =C2=A0 =C2=A0 \def\dummyconversion##1{#2}
= =C2=A0 =C2=A0 =C2=A0 \defineconversion[dummyconversion][\dummycon= version]
=C2=A0 =C2=A0 =C2=A0 \setupformulas[conversion=3Ddummyconv= ersion]
=C2=A0 =C2=A0 =C2=A0 \placeformula[#1]}

\starttext
\pl= aceformulatag[tag]{test} \startformula
=C2=A0 =C2=A0E =3D mc^2
\stopf= ormula
See \in formula[tag] for a tagged formula
\stoptext
%------= ----------------------8<-------------------------
=
However, the following (simpler) code produce an "Undef= ined control sequence" when using \in command.

\starttext
{
=C2= =A0 \def\a#1{test}
=C2=A0 \defineconversion[a][\a]
=C2=A0 \setupformu= lae[numberconversion=3Da]
=C2=A0 \placeformula[tes= t]
=C2=A0 \startformula E =3D mc^2 \stopformula
}
This is m= y reference: \in{formula}[test].
\stoptext

The following code, does not produce the error, but is not practic= al for the reproducing the \tag command.

\starttext
{
=C2=A0 \def\a#1{test}
=C2=A0= \defineconversion[a][\a]
=C2=A0 \setupformulae[numberconversion=3D= a]
=C2=A0 \placeformula[test]
=C2=A0 \startformula E= =3D mc^2 \stopformula
=C2=A0 This is my reference: \in{formula}[= test].
}
\stoptext

What am I doing wr= ong? I guess the command \a is no longer defined when the compiler hit \in = but how can I ensure that such local definition stay accessible ?

Thank you in advance,

=
Antoine C.


On 27 February 2017 at 17:28, Antoine Cailliau <antoinecailliau= @gmail.com> wrote:
Thanks.=C2=A0

I updated the wiki.

On 27 Februa= ry 2017 at 17:18, Pablo Rodriguez <oinos@gmx.es> wrote:
On 02/27/2017 04:55 PM, Antoine Cailliau wro= te:
> The following code is documented to change the numbering of the equati= ons.
> However, this still use numerals for the equations.
> [...]
> Is this a bug ? Is it the correct way to change the numbering ?<= br>
Hi Antoine,

it=E2=80=99s numberconversion (as it reads in =E2=80=9CConTeXt Commands=E2= =80=9D):

=C2=A0 =C2=A0 \setupformulas[numberconversion=3Dgreek]
=C2=A0 =C2=A0 \setupbodyfont[dejavu]
=C2=A0 =C2=A0 \starttext
=C2=A0 =C2=A0 \placeformula[test]
=C2=A0 =C2=A0 \startformula E =3D mc^2 \stopformula
=C2=A0 =C2=A0 \stoptext

BTW, if this is wrong documented in the wiki, please correct it for<= br> future reference.

Pablo
--
http:/= /www.ousia.tk
_________________________________________________________________= __________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listin= fo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________



--001a11418fde2000b80549b9f836-- --===============5768893415692111587== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============5768893415692111587==--