* does expandaparameters work
@ 2010-05-12 17:29 Erik Margraf
2010-05-13 13:41 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Erik Margraf @ 2010-05-12 17:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 385 bytes --]
Hello,
I use "\expandparameters" in a macro definition.
--
\expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
--
This works in MkII (texexec), but doesn't work in MkIV (context).
If I define all layers in a single declaration, the results with MkII and
MkIV
are identical.
Should this work? Or do I have to add something for MkIV?
Thanks and kind regards
Erik
[-- Attachment #1.2: Type: text/html, Size: 448 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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] 5+ messages in thread
* Re: does expandaparameters work
2010-05-12 17:29 does expandaparameters work Erik Margraf
@ 2010-05-13 13:41 ` Wolfgang Schuster
2010-05-13 18:04 ` Erik Margraf
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2010-05-13 13:41 UTC (permalink / raw)
To: erik.margraf, mailing list for ConTeXt users
Am 12.05.10 19:29, schrieb Erik Margraf:
> Hello,
> I use "\expandparameters" in a macro definition.
> --
> \expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
> --
> This works in MkII (texexec), but doesn't work in MkIV (context).
>
> If I define all layers in a single declaration, the results with MkII
> and MkIV
> are identical.
>
> Should this work? Or do I have to add something for MkIV?
\unprotected\def\xdoget@e@parameters#1]%
{\let\dosetnvalue\setsomevalue
\let\setsomevalue\dosetevalue
\let\p!doassign\p!e!doassign
\let\setsomevalue\dosetevalue
\xprocesscommaitem#1,],\@relax@
\let\p!doassign\p!n!doassign
\let\setsomevalue\dosetnvalue
\let\xdogetparameters\xdoget@n@parameters
\let\currentvalue\empty}
\starttext
\getparameters[my][text=Hello]
\mytext
\expandparameters \getparameters[my][text=\currentvalue\space World!]
\mytext
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: does expandaparameters work
2010-05-13 13:41 ` Wolfgang Schuster
@ 2010-05-13 18:04 ` Erik Margraf
2010-05-14 13:25 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Erik Margraf @ 2010-05-13 18:04 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1106 bytes --]
Thanks!! Works perfectly for me. Is this a patch for syst-aux.mkiv?
2010/5/13 Wolfgang Schuster <schuster.wolfgang@googlemail.com>
> Am 12.05.10 19:29, schrieb Erik Margraf:
>
> Hello,
>> I use "\expandparameters" in a macro definition.
>> --
>> \expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
>> --
>> This works in MkII (texexec), but doesn't work in MkIV (context).
>>
>> If I define all layers in a single declaration, the results with MkII and
>> MkIV
>> are identical.
>>
>> Should this work? Or do I have to add something for MkIV?
>>
>
> \unprotected\def\xdoget@e@parameters#1]%
> {\let\dosetnvalue\setsomevalue
> \let\setsomevalue\dosetevalue
> \let\p!doassign\p!e!doassign
> \let\setsomevalue\dosetevalue
> \xprocesscommaitem#1,],\@relax@
> \let\p!doassign\p!n!doassign
> \let\setsomevalue\dosetnvalue
> \let\xdogetparameters\xdoget@n@parameters
> \let\currentvalue\empty}
>
> \starttext
>
> \getparameters[my][text=Hello]
>
> \mytext
>
> \expandparameters \getparameters[my][text=\currentvalue\space World!]
>
> \mytext
>
> \stoptext
>
> Wolfgang
>
>
[-- Attachment #1.2: Type: text/html, Size: 1725 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2010-05-14 13:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12 17:29 does expandaparameters work Erik Margraf
2010-05-13 13:41 ` Wolfgang Schuster
2010-05-13 18:04 ` Erik Margraf
2010-05-14 13:25 ` Wolfgang Schuster
2010-05-14 13:33 ` Hans Hagen
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).