[NTG-context] How to sort list of sections?

Kerry Sainsbury kerry at fidelma.com
Thu Nov 7 00:13:22 CET 2019


Hi Folks,

If sections are just lists, and lists can be sorted, how can I sort a list
of sections?
My actual goal is to generate an 'index' that is made up of section
headings.
Here's my attempt that does not work.


\setuphead[section][number=no ]


% This was a guess at how I might be able to sort sections. I was wrong :-)

\definesorting[section][sections]

\setupsorting[sections][criterium=all]


% I thought something like this might work too

\definesorting[wahs]

\definesorting[wah][wahs][\getmarking[section]][\getmarking[section]]


\starttext

placelist (not sorted, as you would expect):

\placelist[section]

\blank


placelistofsorts (doesn't render anything. My guess was wrong)

\placelistofsorts[wahs]


Sections start here:

\startsection[title={Beta}]

Hello


\startsection[title={Alpha}]

World

\stoptext



Thank you for your time. I really appreciate it.


Kerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20191107/cfcd3f84/attachment.html>


More information about the ntg-context mailing list