From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110929 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Reviczky Newsgroups: gmane.comp.tex.context Subject: Re: Formula numbering including all prefix segments Date: Sun, 21 Mar 2021 13:41:57 +0000 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5444281519276784178==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22836"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 21 14:42:39 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNyLn-0005r3-DV for gctc-ntg-context-518@m.gmane-mx.org; Sun, 21 Mar 2021 14:42:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1A486280E27; Sun, 21 Mar 2021 14:42:12 +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 sH3I6vuTUj40; Sun, 21 Mar 2021 14:42:11 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1A78D281B8C; Sun, 21 Mar 2021 14:42:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EA82F281B1C for ; Sun, 21 Mar 2021 14:42:09 +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 CyjPGNTyf_fb for ; Sun, 21 Mar 2021 14:42:09 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.41; helo=mail-ej1-f41.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 09F44280E27 for ; Sun, 21 Mar 2021 14:42:08 +0100 (CET) Original-Received: by mail-ej1-f41.google.com with SMTP id ce10so16971787ejb.6 for ; Sun, 21 Mar 2021 06:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l61Ngw/RsaHfOG9hIKmXGk9ETzGl+ue6f6A9SDabqPY=; b=HTRwPvIo5l6Yx90fk6B96YKqwewo55dG6qboEj1TxDkIK3531Sjw+EBmFipnm0avOG R6bfX3zx9qy0lYIpwHvbqRpSq3bo2dAtHFR+LStpwe5jMe8IHFpYKSmN73YeMRwFDO3N /qAkLHEzKGbIOsSf8tqBWtrRMIAvKKyKpmfN1sgzJvm7BbahFuJxKYZFjA0ZRGsQzXHb unLxs1Bi9Kj3BxEC+yvakO2KJKfjRgYNo57SktjBTE/vI+YpiEbAe2kX3m55R6qwJSOo snw70vp7B1alkUOp/LNaj/FohEAyHDYOo/9OyqbWh8hEtpYEgMvvxK6s7g7v/lI/Sh+O wi6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l61Ngw/RsaHfOG9hIKmXGk9ETzGl+ue6f6A9SDabqPY=; b=KVYLTH+iku9XdzOuJ2097RR8kp0BJ23HIiTTzbxr8n3p/gt+/gYB+K7ILEWklGK7QR gy2ozANm96q9+8+MxnNJ9SHumfdAzFALlov9LngjS+62DsHvhtDLCltRGGi5qNt5DVoL UmlTrPWKWSJTXz3mcJZDAjBOtNmzUiSUp+09FhmDjzmbui99SPzzTRMbI4klDGOS2pdG N+z0eDGVbxNop/Uw10ZkhpP6a1bdcY9xP1Fray9UG6ZvoLMydDYND6QzQ0KYIcMapW7O EXqDQZiaOAHxN47g1tDrLiXZiX4Rj/m1xPj/rX6Zn/n2n2w10gw0My/DQHGhSJXHqlE4 wX3g== X-Gm-Message-State: AOAM530MDAPLGSIsnEpdpRqDI+/9wV32EwJRsjND5s1DaMNuIPUYbMkv bkJ0KfZeThCypuUUd5SPDIQ9pd9lgmzbUbBLq8ZlAjDloDc= X-Google-Smtp-Source: ABdhPJy9oh1kqGmgTv4+vAvkWpiIOzB/0OIaAA6UFs/psf3121rfSahONk8/UrDD0dwRXW+bEmfWzBlqstSpPqJn4OQ= X-Received: by 2002:a17:906:cd05:: with SMTP id oz5mr14797142ejb.345.1616334128651; Sun, 21 Mar 2021 06:42:08 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:110929 Archived-At: --===============5444281519276784178== Content-Type: multipart/alternative; boundary="00000000000093a8dc05be0c1d91" --00000000000093a8dc05be0c1d91 Content-Type: text/plain; charset="UTF-8" Hi Hans, That does it indeed, thank you! Together with prefixconversion I mainly wanted to use this for formulas in the appendix with the added prefix. I'll add it to the wiki, as it is a very helpful information. Adam On Sun, Mar 21, 2021 at 12:55 PM Hans Hagen wrote: > On 3/20/2021 11:45 PM, Adam Reviczky wrote: > > Hi, > > > > Is there a way to have formula numbers showing all prefix segments? > > When I use prefixsegments, I get the desired numbering in the placelist > > but not in the formula number itself. > > > > For example: > > \starttext > > \setupcaption[figure][way=bytext,prefixsegments=1:*] > > \setupformulas[way=bytext,prefixsegments=1:*] > > \startsection[title=Section] > > \startsubsection[title=SubSection] > > \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure > > \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2 > > \stopformula \stopplaceformula > > \stopsubsection > > \stopsection > > \placelistoffigures[criterium=all] > > \placelist[formula][criterium=all] > > \stoptext > > > > The figure has number 1.1.1 and is in the list as 1.1.1, the formula has > > number 1.1 but is listed as 1.1.1. > > I would like to have the formula numbered 1.1.1 as well (as referenced > > in the placelist), so with section and subsection numbering. > you need to add: prefixset=all (default is limited to 3, see strc-def) > > \starttext > \setupcounter[formula][way=bytext] > \setupcaption[figure][way=bytext,prefixsegments=1:*] > \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] > > \startchapter[title=Chapter] > \dorecurse{4}{ > \startsection[title=Section] > \startsubsection[title=SubSection] > \startplacefigure[list=cow] \externalfigure[cow] > \stopplacefigure > \startplaceformula[reference=eq1] \startformula c^2 > = a^2 + b^2 \stopformula \stopplaceformula > \stopsubsection > \startsubsection[title=SubSection] > \startplacefigure[list=cow] \externalfigure[cow] > \stopplacefigure > \startplaceformula[reference=eq1] \startformula c^2 > = a^2 + b^2 \stopformula \stopplaceformula > \stopsubsection > \stopsection > } > \stopchapter > > \placelistoffigures[criterium=all] > \placelist[formula][criterium=all] > \stoptext > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > --00000000000093a8dc05be0c1d91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hans,

That does it indeed= , thank you!

Together with prefixconversion I = mainly wanted to use this for formulas in the appendix with the added prefi= x.

I'll add it to the wiki, as it is a ver= y helpful information.

Adam
On Sun, M= ar 21, 2021 at 12:55 PM Hans Hagen <j.hagen@xs4all.nl> wrote:
On 3/20/2021 11:45 PM, Adam Reviczky wrote:
> Hi,
>
> Is there a way to have formula numbers showing all prefix segments? > When I use prefixsegments, I get the desired numbering in the placelis= t
> but not in the formula number itself.
>
> For example:
> \starttext
> \setupcaption[figure][way=3Dbytext,prefixsegments=3D1:*]
> \setupformulas[way=3Dbytext,prefixsegments=3D1:*]
> \startsection[title=3DSection]
> \startsubsection[title=3DSubSection]
> \startplacefigure[list=3Dcow] \externalfigure[cow] \stopplacefigure > \startplaceformula[reference=3Deq1] \startformula c^2 =3D a^2 + b^2 > \stopformula \stopplaceformula
> \stopsubsection
> \stopsection
> \placelistoffigures[criterium=3Dall]
> \placelist[formula][criterium=3Dall]
> \stoptext
>
> The figure has number 1.1.1 and is in the list as 1.1.1, the formula h= as
> number 1.1 but is listed as 1.1.1.
> I would like to have the formula numbered 1.1.1 as well (as referenced=
> in the placelist), so with section and subsection numbering.
you need to add: prefixset=3Dall (default is limited to 3, see strc-def)
\starttext
=C2=A0 =C2=A0 =C2=A0\setupcounter[formula][way=3Dbytext]
=C2=A0 =C2=A0 =C2=A0\setupcaption[figure][way=3Dbytext,prefixsegments=3D1:*= ]
=C2=A0 =C2=A0 =C2=A0\setupformulas[way=3Dbytext,prefixsegments=3D1:*,prefix= set=3Dall]

=C2=A0 =C2=A0 =C2=A0\startchapter[title=3DChapter]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\dorecurse{4}{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\startsection[title=3DSecti= on]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\startsubsect= ion[title=3DSubSection]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\startplacefigure[list=3Dcow] \externalfigure[cow]
\stopplacefigure
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\startplaceformula[reference=3Deq1] \startformula c^2
=3D a^2 + b^2 \stopformula \stopplaceformula
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\stopsubsecti= on
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\startsubsect= ion[title=3DSubSection]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\startplacefigure[list=3Dcow] \externalfigure[cow]
\stopplacefigure
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\startplaceformula[reference=3Deq1] \startformula c^2
=3D a^2 + b^2 \stopformula \stopplaceformula
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\stopsubsecti= on
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\stopsection
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0\stopchapter

=C2=A0 =C2=A0 =C2=A0\placelistoffigures[criterium=3Dall]
=C2=A0 =C2=A0 =C2=A0\placelist[formula][criterium=3Dall]
\stoptext
-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
--00000000000093a8dc05be0c1d91-- --===============5444281519276784178== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5444281519276784178==--