From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78178 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 12:45:13 +0200 Message-ID: <0FEE6714-FBC1-4B68-B515-0A9DB5230D83@gmail.com> References: <504C565D.9040405@gyza.cz> <8B71799E-2E78-44D0-B821-49EC2326BC44@gmail.com> <504C70DA.70807@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="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347187530 25387 80.91.229.3 (9 Sep 2012 10:45:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 10:45:30 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 09 12:45: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 1TAf18-0005jY-Kf for gctc-ntg-context-518@m.gmane.org; Sun, 09 Sep 2012 12:45:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13B76101EF; Sun, 9 Sep 2012 12:45:27 +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 g9VBDs-DvApo; Sun, 9 Sep 2012 12:45:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0931F101E8; Sun, 9 Sep 2012 12:45:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2E07B101E8 for ; Sun, 9 Sep 2012 12:45:23 +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 6pwGHNrz7Uh0 for ; Sun, 9 Sep 2012 12:45:22 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 63183101DF for ; Sun, 9 Sep 2012 12:45:22 +0200 (CEST) Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q89AjKvb000908 for ; Sun, 9 Sep 2012 12:45:21 +0200 Original-Received: by wgbdq12 with SMTP id dq12so763511wgb.2 for ; Sun, 09 Sep 2012 03:45:20 -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=LcB4yCCX3Ww+qIkZS6KZrf/aN5fyzdfK8G2Ddn1QqzI=; b=hZR8oehSlMpu34p6VheuTw2PK71jtYsb2ddNhuNBqyECkSWA4g8DOF2FZsihPbd4hZ CdjoF1VO4DVEJjHpEre6CQ70D1SQ0LwWExkaa/RltBicsACwsPej3YA1ZEOlC+AC6cdw XIByzr5kZaDOboxv7r9pqRp5/vdZjHDFvVcMDDWYK6dbb8c+u1Y4lzVwx90QusC4kZSp CuCCYAP3DwjytcydpI+OPJQYEgX+5UmjRk9A2o4AhZx+0TS7FdK+k4JSpqXJJrIhXVWh Nt/2F02O4W0j3xNthz/75x4h2Brhnk8lLTKp+++MdE6HLO2H8KiD3AI/jxwRF7Nx+TsG cpUg== Original-Received: by 10.180.82.39 with SMTP id f7mr9860479wiy.2.1347187520653; Sun, 09 Sep 2012 03:45:20 -0700 (PDT) Original-Received: from [10.141.12.77] ([89.204.138.77]) by mx.google.com with ESMTPS id fb20sm15625602wid.1.2012.09.09.03.45.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 03:45:19 -0700 (PDT) In-Reply-To: <504C70DA.70807@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.45; 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: 08HUWJk7N - d0a3a1f970eb - 20120909 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:78178 Archived-At: Am 09.09.2012 um 12:35 schrieb Jaroslav Hajtmar : > 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=1, value={value}] > > \getparameters[myotherspacename][id=1, value={value}] > > \starttext > > % \myspacenameid % not work > % \myspacename{id} % not work > % \myspacenameparameter{id} % not work > % ??? > > \myotherspacenameid % this works only > > \stoptext When you use \getparameter you have to define the command yourself, e.g. \def\mynamespaceid#1{\csname mynamespace#1\endcsname} or you use \definenamespace which creates all these commands for you: \starttext \definenamespace[one][name=one,command=yes,setup=yes,parent=one] \definenamespace[two][name=two,command=yes,setup=yes,parent=one] % With this parent setting \twoparameter uses the values from \setupone % when no value is set with \setuptwo. \unprotect \setuptwo[parent=\????one] \protect \setupone[one=One,two=Two] \starttabulate \NC one:one \EQ \oneparameter{one} \NC\NR \NC one:two \EQ \oneparameter{two} \NC\NR \NC two:one \EQ \twoparameter{one} \NC\NR \NC two:one \EQ \twoparameter{two} \NC\NR \stoptabulate \setuptwo[one=1,two=2] \starttabulate \NC one:one \EQ \oneparameter{one} \NC\NR \NC one:two \EQ \oneparameter{two} \NC\NR \NC two:one \EQ \twoparameter{one} \NC\NR \NC two:one \EQ \twoparameter{two} \NC\NR \stoptabulate \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________