From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78176 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Working with variables in MkIV (\ setvariables, \getparameters etc) Date: Sun, 9 Sep 2012 11:35:07 +0200 Message-ID: <8B71799E-2E78-44D0-B821-49EC2326BC44@gmail.com> References: <504C565D.9040405@gyza.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1347183331 29998 80.91.229.3 (9 Sep 2012 09:35:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 09:35:31 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 09 11:35:33 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TAdvQ-000349-Va for gctc-ntg-context-518@m.gmane.org; Sun, 09 Sep 2012 11:35:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1F78A101F0; Sun, 9 Sep 2012 11:35:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1KA0xTurNjHb; Sun, 9 Sep 2012 11:35:26 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 64C12101EA; Sun, 9 Sep 2012 11:35:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4E9FF101EA for ; Sun, 9 Sep 2012 11:35:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nq6r+oO57zRs for ; Sun, 9 Sep 2012 11:35:23 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 97A54101DF for ; Sun, 9 Sep 2012 11:35:23 +0200 (CEST) Original-Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q899cuSS013741 for ; Sun, 9 Sep 2012 11:38:56 +0200 Original-Received: by weys10 with SMTP id s10so739380wey.14 for ; Sun, 09 Sep 2012 02:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=aLJicGXGaXfpEg5f1ibwYLkPWYURFzPhttib2bgHRAM=; b=VPiM//G8hftadpBQZbW9BReXwimnbS1slxzPcBpHCilI8AbhhVh6XsERBevpTy+ms/ zMKgOSQE+5LxbfDlbnEb4YEJgCRmW9H4pzb3mcKV+qCq7ZWvOca3xIO8GzEHMB6ka4p9 o1zUFlTkQgGM4SaVs79TX/GtcypvbBjyKszxEFqVxrXLwgXQspGFu/qcRHxX8sO8AaEc O29Dybl7JfdSny0DiiZRixiNPQIxn+psMUOlvSWDeClJOZZKWi+/LH9E3eTUssjKADzR BxPjMXZoUeOgIabW7dDNH0UHQVLQVUMUqPVDZEop0ATK4cBNuCMOdt7sAmkz59Kj/pOF ozRw== Original-Received: by 10.180.93.68 with SMTP id cs4mr9506854wib.14.1347183322697; Sun, 09 Sep 2012 02:35:22 -0700 (PDT) Original-Received: from [10.141.12.77] ([89.204.138.77]) by mx.google.com with ESMTPS id k2sm15145057wiz.7.2012.09.09.02.35.16 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 02:35:21 -0700 (PDT) In-Reply-To: <504C565D.9040405@gyza.cz> X-Mailer: Apple Mail (2.1486) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01HUVCUMl - c2a520d842fb - 20120909 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78176 Archived-At: Am 09.09.2012 um 10:42 schrieb Jaroslav Hajtmar : > Hello ConTeXist, > = > Is it possible go through all the keys of \setvariables (getvariable) ma= cro and create the appropriate macros, as in the case of \getparameters mac= ro? > = > I mean macro like \getallvariablesfrom[myfirstnamespace], which return co= ntents of brackets macro \setvariables[myfirstnamespace] (it mean list of a= ll assignments key=3Dvalue ...) > = > In addition, you can assign all the variables one namespace to another na= mespace (or to create a loop which all variables passed and placed into the= other namespace.)? > = > Thanx Jaroslav Hajtmar > = > Here is my inspiration of example : > = > = > \setvariables[myfirstnamespace][id=3D1, value=3D{text}] > = > \starttext > = > % \getparameters[myfirstnamespace][\getallvariablesfrom[myfirstnamespace]] > = > % Now would be defined macros \myfirstnamespaceid (1) and \myfirstnames= pacevalue (text) > = > = > % Assign all the variables of [myfirstnamespace] namespace to [myotherspa= ce] namespace? > %\setvariable[myotherspace][\getallvariablesfrom[myfirstnamespace]] > = > \stoptext There is no way to access the list with the parameters from \setvariables b= ut the question why you want a command for each variable. In MkIV direct use of values in the form = \myfirstnamespaceid are replaced with something like \mynamespaceparameter{id} which has the ad= vantage that you can even use keys which haven=92t been assigned before. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________