ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: jbf <roma83537@gmail.com>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: chronological TOC
Date: Tue, 30 Jan 2024 07:45:11 +1100	[thread overview]
Message-ID: <39bd12fc-0781-44c0-9db9-4c1f0be852aa@gmail.com> (raw)
In-Reply-To: <3f6cbeb1-bc02-4f4b-4875-4dc103dc0a9d@gmail.com>

And indeed this is the best solution I could find, though it obviously 
meant that something like '29 April 2017' was no good for sorting on... 
it has to be the US date format YY-MM-DD

Julian

On 30/1/24 06:15, Wolfgang Schuster wrote:
> Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:
>> Am 26.01.24 um 23:46 schrieb jbf:
>>> I wonder if someone can point me in the right direction for a 
>>> separate TOC which needs to be in chronological order at the back of 
>>> the book (i.e. not in page number order, although I need the page 
>>> numbers to show up in the TOC. There is the normal TOC at the front 
>>> of the book, according to chapter titles.
>>>
>>> I have succeeded in defining a separate TOC to place at the back, 
>>> but have not succeeded in the chronological order! Here is what I 
>>> have done:
>>>
>>> \definelist[chron][criterium=all,alternative=c]
>>>
>>> At the back of the book:
>>>
>>> \placelist[chron][criterium=all]
>>>
>>> Then at an appropriate point after each \startchapter I have placed 
>>> (as an example):
>>>
>>> \writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}
>>>
>>> This gives me my list, but in page number order. How do I get the 
>>> date (e.g. 29 April 2017) to be the ordering factor in the list. I 
>>> assume it will be something to do with criterium, but am clueless at 
>>> the moment on how to indicate this.
>>
>> I don’t know if it works this way (the wizards will know a way), but 
>> for special needs I’m (ab)using indexes:
>> just add something like \index[2017-04-29]{Speech, Panama City} to 
>> your chapter command and setup the index at will.
>
> Lists have a sort option but this is no use here because you can't use 
> the title to have a chronological sorted list.
>
> \starttext
>
> \placelist[section][order=title]
>
> \section{Hans}
>
> \section{Peter}
>
> \section{Anton}
>
> \stoptext
>
> Using the register mechanism as you suggest seems to be the best 
> option in this case.
>
> Wolfgang
> ___________________________________________________________________________________ 
>
> 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
> ___________________________________________________________________________________ 
>
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2024-01-29 20:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 22:46 [NTG-context] " jbf
2024-01-27  9:05 ` [NTG-context] " Henning Hraban Ramm
2024-01-29 19:15   ` Wolfgang Schuster
2024-01-29 20:12     ` Bruce Horrocks
2024-01-29 20:45     ` jbf [this message]
2024-01-30  8:05       ` Henning Hraban Ramm
2024-01-30 12:08         ` BPJ

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=39bd12fc-0781-44c0-9db9-4c1f0be852aa@gmail.com \
    --to=roma83537@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /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).