Difference between revisions of "Command/definesorting"
< Command
Jump to navigation
Jump to search
m (cleanup) |
|||
Line 30: | Line 30: | ||
== Example == | == Example == | ||
<!-- Please fill in an example if you can --> | <!-- Please fill in an example if you can --> | ||
+ | |||
+ | <texcode> | ||
+ | \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 | ||
+ | </texcode> | ||
+ | <context> | ||
+ | \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 | ||
+ | </context> | ||
== See also == | == See also == |
Revision as of 08:30, 7 October 2011
\definesorting
Syntax
\definesorting[...][...][...] | |
[...] | singular |
[...] | plural |
[...] | command |
Description
Example
\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