[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.
>\GetList #1,#2;->\edef \ListHead 
>
>  
>
teaser:

\def\ResetMyList{\lua{MyList = {} ;}}
\def\FlushMyList{\lua{tex.print(table.concat(MyList,","))}}
\def\AddToMyList#1#2{\lua{table.insert(MyList,#1,"#2")}}
\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

\AddToMyList{1}{mine-1} \setups[test]
\AddToMyList{2}{mine-2} \setups[test]
\AddToMyList{1}{mine-3} \setups[test]

\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


More information about the ntg-context mailing list