ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Working with variables in MkIV (\ setvariables, \getparameters etc)
@ 2012-09-09  8:42 Jaroslav Hajtmar
  2012-09-09  9:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Jaroslav Hajtmar @ 2012-09-09  8:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-09 13:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-09  8:42 Working with variables in MkIV (\ setvariables, \getparameters etc) Jaroslav Hajtmar
2012-09-09  9:35 ` Wolfgang Schuster
2012-09-09 10:35   ` Jaroslav Hajtmar
2012-09-09 10:45     ` Wolfgang Schuster
2012-09-09 11:56       ` Jaroslav Hajtmar
2012-09-09 12:44         ` Wolfgang Schuster
2012-09-09 13:11           ` Jaroslav Hajtmar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).