From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114572 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 00:21:54 +0000 Message-ID: References: <380c0303-2648-3ab6-5012-4656f46c9fa1@gmail.com> <6081BAB4-D066-469D-85CE-FB46BDD95D49@boede.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4811425289894171718==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Reviczky To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 22 01:22:50 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 1nWSIU-0005qe-93 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 22 Mar 2022 01:22:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1D38828992E; Tue, 22 Mar 2022 01:22:13 +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 MGK0gp4SwJcA; Tue, 22 Mar 2022 01:22:11 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0AEB1289916; Tue, 22 Mar 2022 01:22:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E4FA1289915 for ; Tue, 22 Mar 2022 01:22:08 +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 CHKki4o3XULj for ; Tue, 22 Mar 2022 01:22:06 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.44; helo=mail-ej1-f44.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 8466C289756 for ; Tue, 22 Mar 2022 01:22:06 +0100 (CET) Original-Received: by mail-ej1-f44.google.com with SMTP id bi12so33119224ejb.3 for ; Mon, 21 Mar 2022 17:22:06 -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 :cc; bh=x+6Rdt8vO5mGBjxCTTdmwlOhyiij9uPyGta8QDjdFkE=; b=Wxu8WM/J8ymcdmtOkwiGs+escvS7QyiUQBKzxjYk5pdBmLcwpKILVFzkGgB0otNroI C/YidxywJ7rxwhiAA/0iEmbPfpKlQme88svdv+JQZf05hfd1mDZk3kxmLTNgA4lCl9fP GjWxEFkcmtkPEG6PHuNsbmDf0Id8w+m/JqJhiBZUVVRv4ygr/DVWB3KWSQ5PUNitgrku 4qt+XFlYWlp+2Z8ErSxNsgHRD/HUG0RTKOrvxG2P4kcX1svH7MuvoiYQkSEY+LWP9Vi5 ZjzSY6WzP6rXXd0ig0PoxuCROmQfhCiXvX0QWoD+FnXMf6+wNXYE3k4EKWR2mLig5pvB 3ktA== 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:cc; bh=x+6Rdt8vO5mGBjxCTTdmwlOhyiij9uPyGta8QDjdFkE=; b=1Tmospfje+Zfm+qTCZnXUkHSkX7wbYqlhJvHqXoWaty7CZ5hSqlVDvn6VQnNELLNgW +OaLfXSInhQ89XasKEc23jbw+Gr4lDu9Zwztw9yeSpqB0JuAkQbD9RYgg3J6TWeGujK1 1DCFDsTRTbqgK5xHZEQN8Bn1VjkCJ5qsoh/bkaoWro1VKS22wTV913x9IPZRLXm8cFbu Pe3sny5I9seiKYUnAtTacWTR/iWWklSbXe37FstFe/fYtqBnsHo8bJSMDLP9OKJvX/ya 31/4znpuv/bkbe/DdAu5KU5w66nl3QMFr8kVn2ikFcAtDbztmOVrvenBJx1ls+RuUlrC YXZA== X-Gm-Message-State: AOAM533Xe34Q5cFiidFQ8JigFrsTHEvAde+zXui2+UG+BX2flT9z9+9y KvnL7F1MbkSdgrQs2cLrJ6Q1QLBNgKAqeHIZopEF5wlLJLLSjw== X-Google-Smtp-Source: ABdhPJwUMY3foJE/XMrS4VMigT5UZY3AkzF2jeFJ9zTZsQ434x94hCXsC9yyWIvZU0jTn4YLE1fiDl6dDxz//iBbxVI= X-Received: by 2002:a17:907:7252:b0:6df:75cc:615e with SMTP id ds18-20020a170907725200b006df75cc615emr23535422ejc.683.1647908525719; Mon, 21 Mar 2022 17:22:05 -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:114572 Archived-At: --===============4811425289894171718== Content-Type: multipart/alternative; boundary="0000000000004c45dd05dac39a15" --0000000000004c45dd05dac39a15 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, There is a good overview of accessible variables at: https://tex.stackexchange.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 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 n= on-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 calcula= tion in a > MetaFun graphic. I assume, that even though this number is not typeset, i= t > 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 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 > > _________________________________________________________________________= __________ > --0000000000004c45dd05dac39a15 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,


Maybe you want something like this?<= /div>

\starttext
\setuphead[chapter][number=3Dno]
= \startchapter[title=3D{My Chapter}]
Hello world!
\startMPcode
labe= l("\currentstructurelistnumber\ \currentstructuretitle", origin);=
draw fullcircle scaled 3cm;
\stopMPcode
\stopchapter
\stoptext=

Adam

On Mon, Mar 21, 2022 at 11:46 P= M jbf via ntg-context <ntg-context= @ntg.nl> wrote:
Willi, offlist: Have to admit I didn't actually try your own com= ment,
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 h= idden 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> 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 th= e 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/mailma= n/listinfo/ntg-context
>>> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.a= anhet.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 e= ntry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/li= stinfo/ntg-context
>> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhe= t.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 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
___________________________________________________________________________= ________
--0000000000004c45dd05dac39a15-- --===============4811425289894171718== 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== --===============4811425289894171718==--