From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21161 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: How to "\processcommalist"? Date: Mon, 4 Jul 2005 23:08:33 +0200 Message-ID: <6faad9f00507041408331cc919@mail.gmail.com> References: <6faad9f005070109152f691f61@mail.gmail.com> <42C5833A.3050204@elvenkind.com> <6faad9f005070111458d0e7fd@mail.gmail.com> <42C951ED.3040400@wxs.nl> Reply-To: Mojca Miklavec , mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1120511455 16044 80.91.229.2 (4 Jul 2005 21:10:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2005 21:10:55 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 04 23:10:49 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpYCx-0005Ke-Qz for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jul 2005 23:10:27 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5C74F12795; Mon, 4 Jul 2005 23:10:21 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11372-06; Mon, 4 Jul 2005 23:10:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 991E9127C3; Mon, 4 Jul 2005 23:08:36 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B422E127C3 for ; Mon, 4 Jul 2005 23:08:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11325-05-2 for ; Mon, 4 Jul 2005 23:08:33 +0200 (CEST) Original-Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.201]) by ronja.ntg.nl (Postfix) with ESMTP id B96A912795 for ; Mon, 4 Jul 2005 23:08:33 +0200 (CEST) Original-Received: by nproxy.gmail.com with SMTP id a4so186789nfc for ; Mon, 04 Jul 2005 14:08:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eT5RbQS6RLHn4/g8ZLRzADe9Ioe9asO5LqRmPTkfaGvo7tbg9kE/eZEG/Rd2D8WB3IBHo9ofW3hsyud8mn3N0ZiY8i6msGkoZk/KLbC76/eF6MlTupyRMc9SLBPtS/eSa0sxYPbXEsyvHIHmAD6SDgGqMocnokuGXFux5x/rV98= Original-Received: by 10.48.239.10 with SMTP id m10mr127478nfh; Mon, 04 Jul 2005 14:08:33 -0700 (PDT) Original-Received: by 10.48.247.2 with HTTP; Mon, 4 Jul 2005 14:08:33 -0700 (PDT) Original-To: mailing list for ConTeXt users In-Reply-To: <42C951ED.3040400@wxs.nl> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21161 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21161 Hans Hagen wrote: > Mojca Miklavec wrote: > > Taco Hoekwater wrote: > >>Mojca Miklavec wrote: > >> > >>>I would like to define a command, which would be called in the followi= ng way: > >>> \TheBossWantsTheWorkToBeDoneOn[monday,wednesday,thursday]{tidy up} > >>> > >>>so that it would be equivalent to: > >>> \WeHaveToDo[monday]{tidy up} > >>> \WeHaveToDo[wednesday]{tidy up} > >>> \WeHaveToDo[thursday]{tidy up} > > Actually, there is an easier way to do this; just swap the arguments to W= eHaveToDo: >=20 > \def\TheBossWantsTheWorkToBeDoneOn[#1]#2% > {\processcommalist[#1]{\WeHaveToDo{#2}}} >=20 > \def\WeHaveToDo#1#2{(#2: #1)} Thanks for the proposal. I included it into Wiki, but in my case the "\WeHaveToDo" was already defined and I needed it exactly in the form that Taco suggested (to call \OnlyStep[#1]{#2} with \OnSteps[1-3,5]{content} in t-rsteps module). > btw, nice thread for a wiki entry I added it to http://contextgarden.net/Inside_ConTeXt#Processing_lists_of_v= alues. > >>>Is there also a possibility to define a command like > >>> \IHaveToDoTheTasks[1-4,7,9-11]{until tomorrow} > >> > >>There was not, but knowing Hans I trust that soon there will be :-). >=20 > hm, well, it does rain outside, but ... Taco's solution already solved my problem, but I believe it would be nice to add some \processenumeratedlist (well, some better name should be given!) command to ConTeXt one day. That way it would be possible to process some commands like \filterpages[file.pdf][1,3,5] also with \filterpages[file.pdf][1-3,5,7-11] Mojca