ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Willi Egger <context@boede.nl>
Subject: Re: Chapter number retrieval
Date: Wed, 23 Mar 2022 00:13:25 +0100	[thread overview]
Message-ID: <2334E08C-0C3B-4F23-8428-1F6CCFE95892@boede.nl> (raw)
In-Reply-To: <CABaoHuu1Tw1fVc4VbEtOAZyUBvQo_037VGRPZF=50UisgE_5Mg@mail.gmail.com>

Hello Adam!

Many thanks for your solution. — It works very well in your example and also in an extended version with \startfrontmatter..\stopfrontmatter \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my wish in the actual setup of my book. — 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> wrote:
> 
> 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=no]
> \startchapter[title={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 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 😁) 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…
> >
> > 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 the text. — However I still would need to retrieve the number for a calculation 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 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2022-03-22 23:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 20:47 Willi Egger via ntg-context
2022-03-21 21:33 ` jbf via ntg-context
2022-03-21 23:19   ` Willi Egger via ntg-context
2022-03-21 23:32     ` jbf via ntg-context
2022-03-22  0:21       ` Adam Reviczky via ntg-context
2022-03-22 23:13         ` Willi Egger via ntg-context [this message]
2022-03-22 23:41           ` Adam Reviczky via ntg-context
2022-03-23 21:44             ` Willi Egger via ntg-context
2022-03-22  2:29 ` śrīrāma via ntg-context
2022-03-22 22:55   ` Willi Egger via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2334E08C-0C3B-4F23-8428-1F6CCFE95892@boede.nl \
    --to=ntg-context@ntg.nl \
    --cc=context@boede.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).