ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michael Bynum <mdbynum@gmail.com>
To: ntg-context@ntg.nl
Subject: Page number not updating in layer
Date: Tue, 3 Feb 2009 01:50:40 -0500	[thread overview]
Message-ID: <bc3554890902022250j65f4249bi3ecb64c1661b88a5@mail.gmail.com> (raw)

I am trying to use a layer to insert a page number in my document, but
the page always displays page number 1.  It seems nothing that I have
tried has worked.  I also don't know how to exclude the first page
from the total number of pages count.  Here is the code I'm trying to
use.


\setupoutput[dvipsone]

\starttext

\definelayer[pagenumber]

\setuplayer
	[pagenumber]
	[width=\paperwidth,
	height=\paperheight,
    state=repeat]

\setlayer[pagenumber][preset=lefttop,x=4in,y=5.5in]%
     {\framed[width=1.25in,align=middle,offset=none]{\tfx Page
                   \getnumber[page]~of~\totalnumberofpages}}

\setupbackgrounds
	[page]
	[background={pagenumber},state=start]

test
\page
test
\page
test

\stoptext


Thanks,
Mike
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2009-02-03  6:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03  6:50 Michael Bynum [this message]
2009-02-03  9:36 ` Wolfgang Schuster
2009-02-03 15:36   ` Michael Bynum
2009-02-03 16:21     ` Wolfgang Schuster
2009-02-03 16:35       ` Michael Bynum

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=bc3554890902022250j65f4249bi3ecb64c1661b88a5@mail.gmail.com \
    --to=mdbynum@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).