ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: multiple backgrounds
Date: Mon, 16 Jan 2006 21:15:47 +0100	[thread overview]
Message-ID: <43CBFEF3.7070900@wxs.nl> (raw)
In-Reply-To: <Pine.LNX.4.58.0601161934280.4913@gaston.free.fr>

� 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

  parent reply	other threads:[~2006-01-16 20:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-14 23:42 Henning Hraban Ramm
     [not found] ` <6faad9f00601141623x70ae39a9m11a0854a9045f418@mail.gmail.com>
2006-01-15  0:37   ` Henning Hraban Ramm
2006-01-15  8:03     ` Peter Münster
2006-01-15 11:17       ` Henning Hraban Ramm
2006-01-16 19:13         ` Peter Münster
2006-01-16 19:51           ` Hans Hagen
2006-01-16 20:15           ` Hans Hagen [this message]
2006-01-15 17:54 ` Hans Hagen
2006-01-15 19:13   ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43CBFEF3.7070900@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).