Am 06.10.2011 um 20:11 schrieb Vyatcheslav Yatskovsky:

> Hi!
> 
> Please, advise me what I can do to alphabetically sort an itemized list? (I 
> have list of songs, and want them to be alphabetically sorted, as an option ).
> 
> \startitemize[n]          %something like 'sort' key would be very useful
> \item Fly me to the moon
> \item Hit the road jack
> \item Sway
> …

\definesorting[song][songs]

\unexpanded\def\SongEntry#1#2#3%
  {\startitemize[packed]
   \startitem#2\stopitem
   \stopitemize}

\starttext

\song{Hit the road jack}
\song{Sway}
\song{Fly me to the moon}

\placelistofsorts[song][criterium=all,command=\SongEntry]

\stoptext

Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to