Re: [NTG-context] sorting list

2006-07-24 Thread Taco Hoekwater


Hans van der Meer wrote:
 Some things I do not understand about sorting:
 
 This is the example:
 \def\sortprocess#1{{\bf #1}}
 \definesorting[city][cities][\callupcities]
 \setupsorting[city][criterium=all,command=\sortprocess]
 \city{Londen}
 \city{Berlijn}
 \city{New York}
 \city{Parijs}
 \city{Amstelveen}
 \placelistofcities
 \callupcities
 
 question 1. The manual states (p.163) When we add a command in the 
 third argument during the definition of the sorted list we may recall 
 sorted list with this command.
 However \callupcities gives me this error:
 Runaway argument?
 ! Paragraph ended before \callupcities was complete.
 to be read again
\par

\callupcities takes an argument, that is what is causing the
error message. But how it is supposed to work, I do not know.

 question 2. The command \sortprocess does work, the items are in bold. 
 But they now are typeset next to one another instead of each one on a 
 line by itself, as occurs without command=\sortprocess on the setup.

You have to extend \sortprocess if you want something besides making
a bold inlined list of cities. Why? Consider this idiom:

   \def\citylist{}
   \def\makecitylist#1{\doglobal\appendtocommalist{#1}\citylist}
   \setupsorting[city][criterium=all,command=\makecitylist]

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] sorting list

2006-07-23 Thread Hans van der Meer
Some things I do not understand about sorting:This is the example:\def\sortprocess#1{{\bf #1}}\definesorting[city][cities][\callupcities]\setupsorting[city][criterium=all,command=\sortprocess]\city{Londen}\city{Berlijn}\city{New York}\city{Parijs}\city{Amstelveen}\placelistofcities\callupcitiesquestion 1. The manual states (p.163) "When we add a command in the third argument during the definition of the sorted list we may recall sorted list with this command."However \callupcities gives me this error:Runaway argument?! Paragraph ended before \callupcities was complete.to be read again                    \par question 2. The command \sortprocess does work, the items are in bold. But they now are typeset next to one another instead of each one on a line by itself, as occurs without command=\sortprocess on the setup.Hans van der Meer ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context