# [NTG-context] multiple backgrounds

Hans Hagen pragma at wxs.nl
Mon Jan 16 21:15:47 CET 2006

� wrote:

>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.
>
>
>
teaser:

\def\ResetMyList{\lua{MyList = {} ;}}
\def\FlushMyList{\lua{tex.print(table.concat(MyList,","))}}
\def\RemoveFromMyList#1{\lua{table.remove(MyList,#1)}}

\defineoverlay[mine-1][ONE]
\defineoverlay[mine-2][TWO]
\defineoverlay[mine-3][THREE]

\startsetups [test] \framed[background={\FlushMyList}]{it works okay}
\stopsetups

\ResetMyList

\RemoveFromMyList{1} \setups[test]
\RemoveFromMyList{1} \setups[test]
\RemoveFromMyList{1} \setups[test]

but ... for at least half a year [we don't expect to have a stable user
interface before eurotex]  you have to fall back on list processing
macros in syst-gen.tex and syst-ext.tex

(you can add to lists, split lists and reconstruct them using those
macros)

Hans