ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: sorting list
Date: Mon, 24 Jul 2006 12:27:30 +0200	[thread overview]
Message-ID: <44C4A092.3070506@elvenkind.com> (raw)
In-Reply-To: <AD793E02-5454-45F8-A76E-0E175682ABE7@science.uva.nl>



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

      reply	other threads:[~2006-07-24 10:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-23 17:45 Hans van der Meer
2006-07-24 10:27 ` Taco Hoekwater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44C4A092.3070506@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).