! Undefined control sequence
Hallo, I have a little problem which I can not solve. The following example works with the definition of \broad in position 1 and it fails in position 2. ------------------------------------- % Position 1 % \def\broad{5*broad} \defineitemgroup[Tst] \setupitemgroup[Tst][1][n,\broad ] % Position 2 \def\broad{5*broad} \starttext \startTst \item Test \stopTst \stoptext ------------------------------------- Why is this? And how can I make it work in position 2? Wolfgang
Am 23.04.10 17:32, schrieb Taco Hoekwater:
-------------------------------------
Why is this?
Because \setupitemgroup expands its third argument.
And how can I make it work in position 2?
\setupitemgroup[Tst][1][n,\noexpand\broad ]
Best wishes, Taco
Taco, don't you think it's better to show users a better alternative if possible? \defineitemgroup[Tst] \setvariables[tst][set={\setupTst[1][n,\getvariable{tst}{broad}*broad]}] \starttext \startTst \item text \stopTst \setvariables[tst][broad=5] \startTst \item text \stopTst \stoptext Wolfgang
On Fri, Apr 23 2010, Wolfgang Schuster wrote:
\setvariables[tst][set={\setupTst[1][n,\getvariable{tst}{broad}*broad]}]
Hello Wolfgang, It works event without \setvariables: \defineitemgroup[Tst] \setupTst[1][n,\getvariable{tst}{broad}*broad] \starttext \setvariables[tst][broad=1] \startTst \item text \stopTst \setvariables[tst][broad=5] \startTst \item text \stopTst \stoptext But why? I don't see any "\noexpand" in the definition of \getvariable... Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Am 23.04.10 22:24, schrieb Peter Münster:
On Fri, Apr 23 2010, Wolfgang Schuster wrote:
\setvariables[tst][set={\setupTst[1][n,\getvariable{tst}{broad}*broad]}]
Hello Wolfgang,
It works event without \setvariables:
\defineitemgroup[Tst] \setupTst[1][n,\getvariable{tst}{broad}*broad] \starttext \setvariables[tst][broad=1] \startTst \item text \stopTst \setvariables[tst][broad=5] \startTst \item text \stopTst \stoptext
But why? I don't see any "\noexpand" in the definition of \getvariable...
Not sure but it could be possible \setvariables makes only a one level expansion and in this case you get '\csname ...broad\endcsname*broad' but not the the number itself. Wolfgang
participants (4)
-
Peter Münster
-
Taco Hoekwater
-
Wolfgang Schuster
-
Wolfgang Werners-Lucchini