![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Hans van der Meer wrote:
On Jun 30, 2006, at 19:05, Hans Hagen wrote:
Hans van der Meer wrote:
Just curious, because the last of the three examples solves the problem.
Why is it that this is allowed in the parameter list of \framed:
\framed[frame=on,\iftrue width=3cm\fi]{abc}
i would not use that kind of tricks, since it's pure luck if it works
But this gives an error: \framed[frame=on,\iftrue background=color,backgroundcolor=green\fi] {abc}
because a , is seen and it separates the if from the fi
! Incomplete \if; all text was ignored after line 42. <inserted text> � � � � � � � � \fi <*> test.tex � � � � � �� emergencyend ?
Allthough�this works and solves the problem I had: \framed[frame=on,background=\iftrue color\else none\fi,backgroundcolor=green]{abc}
Is this somewhat inconsistent behaviour intrinsic to some parameters?� I thought all parameters are picked up by a macro and then stashed away.
indeed
btw background=none will trigger an overlay called 'none', when defined
why do you need such tricks?
I want to switch runtime between colors. The switching occurs inside the execution of a \halign template.
then just redefine the color \definecolor[colorone][r=1] \definecolor[colortwo][g=1] \definecolor[mycolor][colorone] .... \definecolor[mycolor][colortwo] or, when you want to switch many colors, use color palets and switch palets Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------