From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12319 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?Q?Johannes_H=FCsing?= Newsgroups: gmane.comp.tex.context Subject: how to dismantle parametrized macro Date: Tue, 20 May 2003 16:14:37 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <20030520141437.GB1572@ruhrau.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1053439172 21872 80.91.224.249 (20 May 2003 13:59:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 May 2003 13:59:32 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue May 20 15:59:30 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19I7dV-0005ci-00 for ; Tue, 20 May 2003 15:58:37 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 835F910AFC; Tue, 20 May 2003 16:00:23 +0200 (MEST) Original-Received: from mail1.panix.com (mail1.panix.com [166.84.1.72]) by ref.ntg.nl (Postfix) with ESMTP id D005A10ACE for ; Tue, 20 May 2003 15:56:35 +0200 (MEST) Original-Received: from mailspool3.panix.com (mailspool3.panix.com [166.84.1.78]) by mail1.panix.com (Postfix) with ESMTP id 23816487E0 for ; Tue, 20 May 2003 09:56:31 -0400 (EDT) Original-Received: from qossuth (dfn-home12.extern.uni-essen.de [132.252.244.12]) by mailspool3.panix.com (Postfix) with ESMTP id 590D64B340 for ; Tue, 20 May 2003 09:56:31 -0400 (EDT) Original-Received: from hannes by qossuth with local (Exim 3.35 #1 (Debian)) id 19I7sz-0000RO-00 for ; Tue, 20 May 2003 16:14:37 +0200 Original-To: ntg-context@ntg.nl Content-Disposition: inline User-Agent: Mutt/1.3.28i Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: johannes.huesing@ruhrau.de List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12319 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12319 Dear ConTeXters, I am a bit stuck about how to handle the key-value mechanism of ConTeXt. The text here, between my "monkey-see-monkey-do" attempts to write a macro, hopefully demonstrates what I want to achieve. Could sb give me a hand? Thank you very much Johannes ---8-<--- \setupcolors[state=start] \setupoutput[pdf] \definecolor[Accent:1:5][r=0.50, g=0.79, b=0.50] \definecolor[Accent:2:5][r=0.75, g=0.69, b=0.84] \definecolor[Accent:3:5][r=1.00, g=0.76, b=0.53] \definecolor[Accent:4:5][r=1.00, g=1.00, b=0.60] \definecolor[Accent:5:5][r=0.22, g=0.43, b=0.69] \def\defineCBpalet{\dodoubleemptywithset\dodefineCBpalet} \def\dodefineCBpalet[#1][#2]% { \def\sep{} \ifsecondargument \getparameters[CB][\c!n=,#2] \else \def\CBn{3} \fi \def\colorlist{% \dorecurse{\CBn}{ \sep #1:\recurselevel=#1:\recurselevel:\CBn \def\sep{,}}} \definepalet[#1][\colorlist]} \defineCBpalet[Accent][n=5] % I want this to expand into (without the indentation): % \definepalet[Accent] % [Accent:1=Accent:1:5, % Accent:2=Accent:2:5, % Accent:3=Accent:3:5, % Accent:4=Accent:4:5, % Accent:5=Accent:5:5] \starttext \comparepalet[Accent] \stoptext --->-8--- -- Johannes Hüsing There is something fascinating about science. One gets hannes@ruhrau.de such wholesale returns of conjecture from such a trifling investment of fact. Mark Twain