From: Bruce Horrocks <ntg@scorecrow.com>
To: ntg-context mailing list <ntg-context@ntg.nl>
Subject: [NTG-context] Re: last page number for a list
Date: Wed, 3 Apr 2024 11:55:37 +0100 [thread overview]
Message-ID: <A099B6FB-7B40-469E-8FF7-606DC0D835BC@scorecrow.com> (raw)
In-Reply-To: <CAFMOkGUCGuiDS9+ZwTzEvjhs7A2jJ5Abhvsv8z-K+=BG3Qx7Ng@mail.gmail.com>
> On 30 Mar 2024, at 19:59, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> How can I get the last page number of a chapter for a list (ToC)?
>
> Outside of a list, I use \lastpagenumber.
> But that does not work in a list such as the ToC.
>
> Any tips or pointers will be gladly received.
I'm not quite sure what you want to do with these numbers: something like printing out a contents page but instead of the start page of a chapter it shows the last page of the chapter?
If so then try creating a custom list and use \writetolist immediately before each \stopchapter command?
\definelist[LastPages][criterium=all]
\starttext
\completecontent
\page
\completelist[LastPages]
\page
\dorecurse{10}{
\startchapter[title={This is my chapter}]
This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv
\writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
\stopchapter
}
\stoptext
But I can't get the number option of \writetolist to work - the "3." above is ignored. :-(
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-04-03 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 19:59 [NTG-context] " Alan Bowen
2024-04-03 10:55 ` Bruce Horrocks [this message]
2024-04-03 15:16 ` [NTG-context] " Alan Bowen
2024-04-03 15:55 ` Wolfgang Schuster
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=A099B6FB-7B40-469E-8FF7-606DC0D835BC@scorecrow.com \
--to=ntg@scorecrow.com \
--cc=ntg-context@ntg.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).