ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Dynamic content on layers - wiki example not working
Date: Tue, 21 Feb 2012 12:00:47 +0100	[thread overview]
Message-ID: <CAG5iGsBuddRTdS9GfSBJDTKjg17k+B=VgLAb+aXPnABngjr8dg@mail.gmail.com> (raw)
In-Reply-To: <CAGbDsP2ALTcgSCyxbgWE4uCfYeiJRq_qAmi27c7jNUNDLms3Gg@mail.gmail.com>

On Tue, Feb 21, 2012 at 11:34 AM, Mari Voipio <mari.voipio@iki.fi> wrote:
> Hello!
>
> I'm trying to place dynamic content on a layer and now it turns out
> that while getting a different pic every time is easy, getting the
> layers redrawn wasn't that simple. The wiki has this code:
>
> \definelayer
>  [pagenumber]
>  [width=\paperwidth,
>   height=\paperheight,
>   preset=middle,
>   state=repeat]
>
> \setlayer[pagenumber]{Page \pagenumber}
>
> \setupbackgrounds[page][background=pagenumber]
>
> \starttext
> \dorecurse{4}{\page[empty]}
> \stoptext
>
>
>
> AFAIK, that should be a complete  minimal sample. Unfortunately it
> doesn't seem to work, at least my ConTeXt MkIV of February 8 only
> gives "Page 1" on every one of those 4 pages...
right, it's ok
>
>
> How to fix this? Preferably on the "Dummies" level, I'd prefer not to
> see the bowels of my ConTeXt, if I can avoid it.
going on on
http://wiki.contextgarden.net/Layers
you see

\definelayer
  [pagenumber]
  [width=\paperwidth,
   height=\paperheight,
   preset=middle]

\startsetups layer

\setlayer[pagenumber]{Page \pagenumber}

\stopsetups

\setupbackgrounds[page][setups=layer,background=pagenumber]

\starttext
\dorecurse{4}{\page[empty]}
\stoptext

Is that what you want ?
-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2012-02-21 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 10:34 Mari Voipio
2012-02-21 11:00 ` luigi scarso [this message]
2012-02-21 11:53   ` Wolfgang Schuster
2012-02-22  7:02     ` Mari Voipio
2012-02-21 11:06 ` Marco
2012-02-22  6:54   ` Mari Voipio

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='CAG5iGsBuddRTdS9GfSBJDTKjg17k+B=VgLAb+aXPnABngjr8dg@mail.gmail.com' \
    --to=luigi.scarso@gmail.com \
    --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).