On Sun, 15 Jan 2006, Henning Hraban Ramm wrote:
Now I must only find a way to *subtract* a layer, but I guess I can manage that with some "doifmode"s
Hello TeX-experts, I tried to do the layer-subtraction, but it seems that I need more experience with expansion in TeX. Here is the error: ! Undefined control sequence. \GetList #1,#2;->\edef \ListHead And here my test file: \def\GetList#1,#2;{\edef\ListHead{#1}\edef\ListTail{#2}} \def\Remove#1#2{\doRemove{#1}{#2,\relax}} \def\doRemove#1#2{\expandafter\GetList#2;% \doifelse{\ListHead}{#1}{}{\ListHead,}% \doifelse{\ListTail}{\relax}{}{\doRemove{#1}{\ListTail}}% } \def\addBGbefore#1{\expandparameters \setupbackgrounds[page][background={#1,\currentvalue}]} \def\addBGafter#1{\expandparameters \setupbackgrounds[page][background={\currentvalue,#1}]} \def\removeBG#1{\expandparameters \setupbackgrounds[page][background={\Remove{#1}{\currentvalue}}]} \setupcolors[state=start] \defineoverlay[layer1][{\color[red]{this is layer 1}}] \defineoverlay[layer2][{\rotate[rotation=30]{\color[blue]{this is layer 2}}}] \defineoverlay[layer3][{\rotate[rotation=60]{\color[green]{this is layer 3}}}] \starttext \addBGafter{layer1} \input tufte \page \addBGafter{layer2} \input tufte \page \addBGbefore{layer3} \input tufte \page \removeBG{layer2} \Values \input tufte \page \removeBG{layer1} \input tufte \stoptext Cheers, Peter -- http://pmrb.free.fr/contact/