From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78177 Path: news.gmane.org!not-for-mail From: Jaroslav Hajtmar Newsgroups: gmane.comp.tex.context Subject: Re: Working with variables in MkIV (\ setvariables, \getparameters etc) Date: Sun, 09 Sep 2012 12:35:06 +0200 Message-ID: <504C70DA.70807@gyza.cz> References: <504C565D.9040405@gyza.cz> <8B71799E-2E78-44D0-B821-49EC2326BC44@gmail.com> 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="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1347187044 22164 80.91.229.3 (9 Sep 2012 10:37:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 10:37:24 +0000 (UTC) Cc: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 09 12:37:26 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 1TAetK-0007Eo-8D for gctc-ntg-context-518@m.gmane.org; Sun, 09 Sep 2012 12:37:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 79C27101EF; Sun, 9 Sep 2012 12:37:22 +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 fd44Zn2O0Yz5; Sun, 9 Sep 2012 12:37:20 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 90197101E8; Sun, 9 Sep 2012 12:37:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A20F0101E8 for ; Sun, 9 Sep 2012 12:37:18 +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 6o+XOHIMpcIx for ; Sun, 9 Sep 2012 12:37:17 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id DAC3A101DF for ; Sun, 9 Sep 2012 12:37:17 +0200 (CEST) Original-Received: from psi2.forpsi.com (smtpa.forpsi.com [81.2.195.204]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q89AbG19012450 for ; Sun, 9 Sep 2012 12:37:16 +0200 Original-Received: (qmail 13677 invoked by uid 89); 9 Sep 2012 10:37:13 -0000 Original-Received: from unknown (HELO ?192.168.20.101?) (hajtmar@88.103.230.14) by psi02 with ESMTPA; 9 Sep 2012 10:37:13 -0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.1.16) Gecko/20101125 Thunderbird/3.0.11 In-Reply-To: <8B71799E-2E78-44D0-B821-49EC2326BC44@gmail.com> 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: 06HUWBgCh - 7e55d8061899 - 20120909 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:78177 Archived-At: Thanx Wolfgang. I do not know anything about such a possibility. What do you mean? Can you show a simple example? I tried several options but nothing works. Here are some examples: \setvariables[myspacename][id=3D1, value=3D{value}] \getparameters[myotherspacename][id=3D1, value=3D{value}] \starttext % \myspacenameid % not work % \myspacename{id} % not work % \myspacenameparameter{id} % not work % ??? \myotherspacenameid % this works only \stoptext Thanx Jaroslav Hajtmar Dne 9.9.2012 11:35, Wolfgang Schuster napsal(a): > Am 09.09.2012 um 10:42 schrieb Jaroslav Hajtmar: > > = >> Hello ConTeXist, >> >> Is it possible go through all the keys of \setvariables (getvariable) m= acro and create the appropriate macros, as in the case of \getparameters ma= cro? >> >> I mean macro like \getallvariablesfrom[myfirstnamespace], which return c= ontents of brackets macro \setvariables[myfirstnamespace] (it mean list of = all assignments key=3Dvalue ...) >> >> In addition, you can assign all the variables one namespace to another n= amespace (or to create a loop which all variables passed and placed into th= e 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 \myfirstname= spacevalue (text) >> >> >> % Assign all the variables of [myfirstnamespace] namespace to [myothersp= ace] namespace? >> %\setvariable[myotherspace][\getallvariablesfrom[myfirstnamespace]] >> >> \stoptext >> = > There is no way to access the list with the parameters from \setvariables= but the question why you > want a command for each variable. In MkIV direct use of values in the for= m \myfirstnamespaceid > are replaced with something like \mynamespaceparameter{id} which has the = advantage 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 ___________________________________________________________________________= ________