Hans Hagen schrieb:
Peter Rolf wrote:
Hi all,
I tried to seperate some style specific code to external variables. Most things work so far, but the expansion of color causes me problems. I must emphasize that this is no colo-new problem, as my code fails with the old colo-ini too.
I have tried several things, but still no luck. What (expansion) magic is missing in my code? Any help is welcome.
\def\GetFGcolor#1#2#3#4#5{% \ifconditional\CondA \ifconditional\CondC#4% \else#5\fi \else \ifconditional\CondB#1% \else \ifconditional\CondC#2% \else#3\fi \fi \fi}
you introduce spaces
yes, stupid me :)
btw, often its easier to remap colors
\def\test{\color[whatever]{some color}}
\definecolor[whatever][green] test \definecolor[whatever][red] test
or to use palets or ...
I will think about it. Thanks 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________