ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Recomputing useMPgraphic in footers
Date: Mon, 09 May 2005 22:32:30 +0200	[thread overview]
Message-ID: <427FC8DE.6000302@wxs.nl> (raw)
In-Reply-To: <20050509140244.GF4458@erik.fi.muni.cz>

David Antos wrote:
> 	Hello,
> 
> I have
> 
> \defineoverlay[Wave][\useMPgraphic{Wave}]
> 
> \startuseMPgraphic{Wave}
> ...
> \stopuseMPgraphic
> 
> \setupbackgrounds[footer][text][background={Wave}]
> 
> The problem is that the graphics is not re-computed on every page,
> although I pretty convinced it should.
> 
> On the opposite, when I set
> \setupbackgrounds[text][text][background={Wave}]
> it works perfectly well. (The difference is in [footer] vs. [text].)
> 
> An ugly workaround is to call \setupbackgrounds on every page, but it's
> not nice at all. What went wrong?

as already mentioned (by taco): \setupbackgrounds[state=repeat]

only page and text area backgrounds are recalculated each page (otherwise the 
speed penalty is too big]

an option is to do something:

\setupbackgrounds[page][background=PageBackground]
\defineoverlay[PageBackground][\reuseMPgraphic{PageBackground}]

\startreusableMPgraphic{PageBackground}
   StartPage ;
     fill Field[Text][Footer] withcolor red ;
   StopPage ;
\stopreusableMPgraphic

(see metafun manual for details on the page stuff)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

      parent reply	other threads:[~2005-05-09 20:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09 14:02 David Antos
2005-05-09 15:11 ` Taco Hoekwater
2005-05-09 20:32 ` Hans Hagen [this message]

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=427FC8DE.6000302@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).