Am 02.08.2011 um 11:08 schrieb Johan Sandblom:

> I am maintaining a small vademecum for my workplace. One of the things
> it contains is a list of handy phone numbers, which should be sorted.
> Until now I have used the attached hack. It has worked reasonably well
> until the directory outgrew the one page. Before I start to modify my
> hack it occurred to me that ConTeXt most likely has a machinery for
> this already. It is a sort of register, after all. I have looked in
> the manual at registers and sorted lists but have not been able to
> find what I want. The desired specifications are:
> 
> 1. columns (to save space)
> 2. sorted (in a correct Swedish order)
> 3. spans several pages


Alternative solution with ConTeXt’s sorting mechanism:

\mainlanguage[swedish]

\definedescription
  [TelefonEntry]
  [width=2em]

\unexpanded\def\TelefonCommand#1#2#3%
  {\startTelefonEntry{#2}#3\stopTelefonEntry}

\definesorting[Telefon][Telefone]

\starttext

\Telefon[a]{78423}
\Telefon[b]{78264}
\Telefon[ö]{78264}
\Telefon[Ö]{23423}
\Telefon[å]{23402394}
\Telefon[åå]{23042}
\Telefon[ååå]{098234}

\startcolumns[n=3]
\placelistofsorts[Telefon][criterium=all,command=\TelefonCommand]
\stopcolumns

\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