From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78174 Path: news.gmane.org!not-for-mail From: Jaroslav Hajtmar Newsgroups: gmane.comp.tex.context Subject: Working with variables in MkIV (\ setvariables, \getparameters etc) Date: Sun, 09 Sep 2012 10:42:05 +0200 Message-ID: <504C565D.9040405@gyza.cz> Reply-To: hajtmar@gyza.cz, mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347180271 9624 80.91.229.3 (9 Sep 2012 08:44:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 08:44:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 09 10:44:30 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 1TAd7z-0000kO-Rt for gctc-ntg-context-518@m.gmane.org; Sun, 09 Sep 2012 10:44:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4859010200; Sun, 9 Sep 2012 10:44: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 2WpGYlvFwhmr; Sun, 9 Sep 2012 10:44:21 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1C003101EA; Sun, 9 Sep 2012 10:44:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7ED2C101EA for ; Sun, 9 Sep 2012 10:44:19 +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 s2lrmwOEIirU for ; Sun, 9 Sep 2012 10:44:18 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id B3DBF101E8 for ; Sun, 9 Sep 2012 10:44:18 +0200 (CEST) Original-Received: from psi4.forpsi.com (smtpa.forpsi.com [81.2.195.204]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q898iGg3001903 for ; Sun, 9 Sep 2012 10:44:17 +0200 Original-Received: (qmail 17539 invoked by uid 89); 9 Sep 2012 08:44:12 -0000 Original-Received: from unknown (HELO ?192.168.20.101?) (hajtmar@88.103.230.14) by psi04 with ESMTPA; 9 Sep 2012 08:44:12 -0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.1.16) Gecko/20101125 Thunderbird/3.0.11 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=81.2.195.204; country=CZ; latitude=49.7500; longitude=15.5000; http://maps.google.com/maps?q=49.7500,15.5000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04HUUIg72 - 5871486457e5 - 20120909 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 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:78174 Archived-At: Hello ConTeXist, Is it possible go through all the keys of \setvariables (getvariable) macro and create the appropriate macros, as in the case of \getparameters macro? I mean macro like \getallvariablesfrom[myfirstnamespace], which return contents of brackets macro \setvariables[myfirstnamespace] (it mean list of all assignments key=value ...) In addition, you can assign all the variables one namespace to another namespace (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=1, value={text}] \starttext % \getparameters[myfirstnamespace][\getallvariablesfrom[myfirstnamespace]] % Now would be defined macros \myfirstnamespaceid (1) and \myfirstnamespacevalue (text) % Assign all the variables of [myfirstnamespace] namespace to [myotherspace] namespace? %\setvariable[myotherspace][\getallvariablesfrom[myfirstnamespace]] \stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________