From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114578 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Reviczky via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Chapter number retrieval Date: Tue, 22 Mar 2022 23:41:37 +0000 Message-ID: References: <380c0303-2648-3ab6-5012-4656f46c9fa1@gmail.com> <6081BAB4-D066-469D-85CE-FB46BDD95D49@boede.nl> <2334E08C-0C3B-4F23-8428-1F6CCFE95892@boede.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5207761866728074370==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Reviczky To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 23 00:42:28 2022 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 1nWo8x-000172-7K for gctc-ntg-context-518@m.gmane-mx.org; Wed, 23 Mar 2022 00:42:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5E45E289807; Wed, 23 Mar 2022 00:41:56 +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 3q6nUp-xDDT8; Wed, 23 Mar 2022 00:41:53 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 29DFB289925; Wed, 23 Mar 2022 00:41:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 01943289807 for ; Wed, 23 Mar 2022 00:41:52 +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 Hd-IIQPkA_Ci for ; Wed, 23 Mar 2022 00:41:49 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.53; helo=mail-ej1-f53.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 C81EA2860D4 for ; Wed, 23 Mar 2022 00:41:49 +0100 (CET) Original-Received: by mail-ej1-f53.google.com with SMTP id bi12so39504247ejb.3 for ; Tue, 22 Mar 2022 16:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4ElurJnuBPJnIa7xw6UGiP6ZR+J5W/cj6HupYRsAGEs=; b=bP7YRtO5S4FEfj3l0AzAl/JR9WrzprvqFV0I8kUcIRi2QeeqbZyUJmnveVbOLLFg4t yCgLbYD4yeEDJPv5tLfDiCZ2goy9bpPtvOlwopy8v3i6YBZ8MhpMhF1FsE32OX8Oo4Ib 8ka8LfJIF9f+ZbTcXK+D1gowHpRjJpuJ8EK6ibkZVJciTwB4khby4CqNgsKn6zur/l1V m3X9dxGiCBw9iCGYNwz6+EDO5d7NpT6sl30km0aZkanJ6iZ9y5wuEooF95V21F0KDUfx ZriijehWh7dk/THmiwaiDU3ZSCcW8j6Vu8ipuydWUlqbSJUGW3i3eArFPxhJfLkdgnBr wcsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=4ElurJnuBPJnIa7xw6UGiP6ZR+J5W/cj6HupYRsAGEs=; b=8IQJOeW0wwfiZFSZBBpB9Y3Dna2eJfYG5EwRvu5WJzjxbp/BJlT3rYSg5+tNGoRdLO RZlDVMMLOQ40cnR3MrtNPKjCjgw4TtENeV8k880X/Jl23zARxil8nBflIHqTiG6/JN2Y YfIz48X7zWNXAO+foNz79qVMmmudsar5Q/VSlyagbpL7jGoKl9MycgHP8jEBeKpNaQrD n1rjk9raTfew//WbSCO408nx0Zt+JJ+HmxWN1ySgsh1Q6FWZZUSSQPZeDFXF8EWnCU7N HJRA4tdlJ66Lf/83EpJqBvCkW6RE8HJtftg0DbBNqXSUwmOun4BfyIo6aZW/zJzHxMDe HtOg== X-Gm-Message-State: AOAM531H2D/mviy0BUqq/drzcQGrm7FwRkIg7kRHytkm1m3nUnhvjRY4 vnGp9E4hXQmijWA56eUsTvgxgkA+FLg4vaami3T5NS3ws+teAw== X-Google-Smtp-Source: ABdhPJyLV2iUV2w5V29t1VwgLi+2f4GaiR8hm7+5/Y5bqDdJccTOIDhor+5rWriYyF4eEa+zAFJrk2lC9D3qBtKgMF0= X-Received: by 2002:a17:906:974a:b0:6e0:5d30:bef6 with SMTP id o10-20020a170906974a00b006e05d30bef6mr316679ejy.207.1647992508912; Tue, 22 Mar 2022 16:41:48 -0700 (PDT) In-Reply-To: <2334E08C-0C3B-4F23-8428-1F6CCFE95892@boede.nl> 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:114578 Archived-At: --===============5207761866728074370== Content-Type: multipart/alternative; boundary="000000000000161b6905dad72835" --000000000000161b6905dad72835 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Willi, You could also access the number by using the \getmarking[chapternumber][current]. I think you have used a similar approach in the https://wiki.contextgarden.net/Thumb_index. Adam On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context < ntg-context@ntg.nl> wrote: > Hello Adam! > > Many thanks for your solution. =E2=80=94 It works very well in your examp= le and > also in an extended version with \startfrontmatter..\stopfrontmatter > \startbodymatter=E2=80=A6\stopbodymatter. =E2=80=94 Unfortunately It does= not work to my > wish in the actual setup of my book. =E2=80=94 I am using now the solutio= n > presented by Sreeram. > > Again thank you so much! > Kind regards > > Willi > > > On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Hi, > > > > There is a good overview of accessible variables at: > https://tex.stackexchange.com/questions/134474/context-part-chapter-secti= on-and-subsection-names > > > > Maybe you want something like this? > > > > \starttext > > \setuphead[chapter][number=3Dno] > > \startchapter[title=3D{My Chapter}] > > Hello world! > > \startMPcode > > label("\currentstructurelistnumber\ \currentstructuretitle", origin); > > draw fullcircle scaled 3cm; > > \stopMPcode > > \stopchapter > > \stoptext > > > > Adam > > > > On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context > wrote: > > Willi, offlist: Have to admit I didn't actually try your own comment, > > but if it doesn't work, I'll be interested in the eventual answer. I > > recently had to do something similar for the TOC, and Hraban pointed me > > to \currentlistentrynumber. There probably has to be a command along > > those lines (which led me to your 2011 comment, sorry =F0=9F=98=81) for= non-list > > retrieval. \structurenumber? \currentstructurenumber? Something along > > those lines? There seem to be a number of these but as yet undocumented > > as far as I can see. > > > > Julian > > > > On 22/3/22 10:19, Willi Egger via ntg-context wrote: > > > Hi Julian, > > > > > > :-) I am confronted with my own comments :-) > > > > > > However, this is precisely what I am using in my attempt to get this > hidden number. But no it does not appear=E2=80=A6 > > > > > > Thank you! > > > Willi > > > > > >> On 21 Mar 2022, at 22:33, jbf via ntg-context > wrote: > > >> > > >> Willi, > > >> > > >> I see a comment by yourself back in 2011 at > https://wiki.contextgarden.net/Last_Head_Number > > >> > > >> I wonder if this helps? > > >> > > >> Julian > > >> > > >> On 22/3/22 07:47, Willi Egger via ntg-context wrote: > > >>> Hello everybody! > > >>> > > >>> > > >>> I would like to typeset the chapter title without number in the > text. =E2=80=94 However I still would need to retrieve the number for a c= alculation > in a MetaFun graphic. I assume, that even though this number is not > typeset, it is kept in the background. How to retrieve it? > > >>> > > >>> Kind regards > > >>> > > >>> Willi > > >>> > _________________________________________________________________________= __________ > > >>> 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://context.aanhet.net > > >>> archive : https://bitbucket.org/phg/context-mirror/commits/ > > >>> wiki : http://contextgarden.net > > >>> > _________________________________________________________________________= __________ > > >> > _________________________________________________________________________= __________ > > >> 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://context.aanhet.net > > >> archive : https://bitbucket.org/phg/context-mirror/commits/ > > >> wiki : http://contextgarden.net > > >> > _________________________________________________________________________= __________ > > > > _________________________________________________________________________= __________ > > > If your question is of interest to others as well, please add an entr= y > to the Wiki! > > > > > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : http://contextgarden.net > > > > _________________________________________________________________________= __________ > > > _________________________________________________________________________= __________ > > 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://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : http://contextgarden.net > > > _________________________________________________________________________= __________ > > > _________________________________________________________________________= __________ > > 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://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : http://contextgarden.net > > > _________________________________________________________________________= __________ > > > _________________________________________________________________________= __________ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --000000000000161b6905dad72835 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Willi,

You could also acc= ess the number by using the \getmarking[chapternumber][current].
= I think you have used a similar approach in the https://wiki.contextgarden.net/Thumb_index.=

Adam

On Tue, Mar 22, 2022 at 11:15 PM Wi= lli Egger via ntg-context <ntg-con= text@ntg.nl> wrote:
Hello Adam!

Many thanks for your solution. =E2=80=94 It works very well in your example= and also in an extended version with \startfrontmatter..\stopfrontmatter \= startbodymatter=E2=80=A6\stopbodymatter. =E2=80=94 Unfortunately It does no= t work to my wish in the actual setup of my book. =E2=80=94 I am using now = the solution presented by Sreeram.

Again thank you so much!
Kind regards

Willi

> On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context <ntg-context@ntg.nl> wr= ote:
>
> Hi,
>
> There is a good overview of accessible variables at: https://tex.stackexch= ange.com/questions/134474/context-part-chapter-section-and-subsection-names=
>
> Maybe you want something like this?
>
> \starttext
> \setuphead[chapter][number=3Dno]
> \startchapter[title=3D{My Chapter}]
> Hello world!
> \startMPcode
> label("\currentstructurelistnumber\ \currentstructuretitle",= origin);
> draw fullcircle scaled 3cm;
> \stopMPcode
> \stopchapter
> \stoptext
>
> Adam
>
> On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context <ntg-context@ntg.nl> wrote= :
> Willi, offlist: Have to admit I didn't actually try your own comme= nt,
> but if it doesn't work, I'll be interested in the eventual ans= wer. I
> recently had to do something similar for the TOC, and Hraban pointed m= e
> to \currentlistentrynumber. There probably has to be a command along <= br> > those lines (which led me to your 2011 comment, sorry =F0=9F=98=81) fo= r non-list
> retrieval. \structurenumber? \currentstructurenumber? Something along =
> those lines? There seem to be a number of these but as yet undocumente= d
> as far as I can see.
>
> Julian
>
> On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > Hi Julian,
> >
> > :-) I am confronted with my own comments :-)
> >
> > However, this is precisely what I am using in my attempt to get t= his hidden number. But no it does not appear=E2=80=A6
> >
> > Thank you!
> > Willi
> >
> >> On 21 Mar 2022, at 22:33, jbf via ntg-context <ntg-context@ntg.nl> wro= te:
> >>
> >> Willi,
> >>
> >> I see a comment by yourself back in 2011 at https://wiki.contextgarden.net/Last_Head_Number
> >>
> >> I wonder if this helps?
> >>
> >> Julian
> >>
> >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> >>> Hello everybody!
> >>>
> >>>
> >>> I would like to typeset the chapter title without number = in the text. =E2=80=94 However I still would need to retrieve the number fo= r a calculation in a MetaFun graphic. I assume, that even though this numbe= r is not typeset, it is kept in the background. How to retrieve it?
> >>>
> >>> Kind regards
> >>>
> >>> Willi
> >>> _________________________________________________________= __________________________
> >>> 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=C2=A0 : http://www.pragma-ade.nl / http://con= text.aanhet.net
> >>> archive=C2=A0 : https://bitbucket= .org/phg/context-mirror/commits/
> >>> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> >>> _________________________________________________________= __________________________
> >> _____________________________________________________________= ______________________
> >> 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/mailm= an/listinfo/ntg-context
> >> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.= aanhet.net
> >> archive=C2=A0 : https://bitbucket.org= /phg/context-mirror/commits/
> >> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> >> _____________________________________________________________= ______________________
> > _________________________________________________________________= __________________
> > 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/l= istinfo/ntg-context
> > webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanh= et.net
> > archive=C2=A0 : https://bitbucket.org/phg= /context-mirror/commits/
> > wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> > _________________________________________________________________= __________________
> ______________________________________________________________________= _____________
> 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/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________
> ______________________________________________________________________= _____________
> 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/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________

___________________________________________________________________________= ________
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/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000161b6905dad72835-- --===============5207761866728074370== 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== --===============5207761866728074370==--