From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30433 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: How to \processcommalist inside another commalist? Date: Tue, 22 Aug 2006 10:13:40 +0200 Message-ID: <44EABCB4.2010802@wxs.nl> References: <6faad9f00608210823p5beef0feia8b53c7ce734f83a@mail.gmail.com> <6faad9f00608211135r4639b3c5s3eda3346257fed90@mail.gmail.com> <44EA20EB.3050007@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156234450 13330 80.91.229.2 (22 Aug 2006 08:14:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2006 08:14:10 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 22 10:14:08 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1GFROa-0006Vi-D1 for gctc-ntg-context-518@m.gmane.org; Tue, 22 Aug 2006 10:14:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 940921FDDB; Tue, 22 Aug 2006 10:13:59 +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 01009-03; Tue, 22 Aug 2006 10:13:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 59E6E1FD40; Tue, 22 Aug 2006 10:13:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E2FCC1FD40 for ; Tue, 22 Aug 2006 10:13:49 +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 01094-02 for ; Tue, 22 Aug 2006 10:13:45 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id EC7381FCF3 for ; Tue, 22 Aug 2006 10:13:44 +0200 (CEST) Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 2060 for ; Tue, 22 Aug 2006 10:13:44 +0200 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30433 Archived-At: nico wrote: > On Mon, 21 Aug 2006 23:08:59 +0200, Hans Hagen wrote: > > >>>> but after some thinking I realized that it would indeed be a better >>>> idea (less to type?) to have >>>> \useGNUPLOTgraphic[name][1,3] >>>> and >>>> \useGNUPLOTgraphic[name][1,3][width=.9\textwidth] >>>> instead. >>>> >>>> At the beginning the main reason against it was that I didn't know how >>>> to distinguish which kind of parameters are being used in the second >>>> pair of brackets, but I guess that I can safely use \ifnumberelse as a >>>> test on the first item to distinguish between the two. >>>> >>>> >>> Maybe you could play only with the parameter count. The limitation is >>> that >>> an empty second argument is required when only options need to be >>> passed. >>> >>> >> why? in that case #3 is empty and #2 contains the options >> > > Hm, I thought that the initial goal was to know if the parameter passed is > a number list, or an option list. In the suggested code, the assumption is > that the number list (if any) is always the second parameter. > > If not, how to handle those cases? > > \useGNUPLOTgraphic[name][2,3,5] > \useGNUPLOTgraphic[name][width=2in] > > But I guess there are clever internal macros that could help :-) > as already mentioned: \doifassignmentelse{#2}{...}{...} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------