Peter Rolf wrote:
> 
> I have written such a macro, but sadly it crashes when used inside
> \color or \definecolor. Tried to debug it, but this is my first
> experience with the trace commands (probably not the best example to
> start with). Sigh, still so much to learn.. :)

The problem is that it defines things, and you can't do that inside
an argument. Solution: rewrite the macro to define a new macro
(like \def\currentStateDependentColor{green}) instead of expanding
on the fly. Then you have to do something like this:

   \StateDependentColor[stateA=green,stateC=blue,whatever=yellow,...]
   \ color[\currentStateDependentColor]

And that should work.

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to