* Page number not updating in layer
@ 2009-02-03 6:50 Michael Bynum
2009-02-03 9:36 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Michael Bynum @ 2009-02-03 6:50 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Page number not updating in layer
2009-02-03 6:50 Page number not updating in layer Michael Bynum
@ 2009-02-03 9:36 ` Wolfgang Schuster
2009-02-03 15:36 ` Michael Bynum
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2009-02-03 9:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 03.02.2009 um 07:50 schrieb Michael Bynum:
> 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.
You can find a solution from Aditya under the following link:
http://archive.contextgarden.net/message/20070714.145156.91a20ef2.en.html
I wrote also for myself a short test file for myself a while ago.
\definelayer[head] [width=\paperwidth,height=\paperheight]
\definelayer[nexthead][width=\paperwidth,height=\paperheight]
\startsetups layer
\doif {\pagenumber}{1}{\setlayer[head] [offset=2cm]{First page}}
\doifnot{\pagenumber}{1}{\setlayer[nexthead][offset=2cm]{Page
\pagenumber}}
\stopsetups
\setupbackgrounds[page][setups=layer,background={head,nexthead}]
\starttext
\dorecurse{4}{\page[empty]}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Page number not updating in layer
2009-02-03 9:36 ` Wolfgang Schuster
@ 2009-02-03 15:36 ` Michael Bynum
2009-02-03 16:21 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Michael Bynum @ 2009-02-03 15:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
Great that fixed it. Sorry about the subject by the way. I thought
it would auto add the mailing list prefix.
I still can't get the total number of pages to work out right if I
have a title page. I used standardmakeup to keep the title page from
being numbered, but it is still counted in \totalnumberofpages.
\definelayer[headerfooter][width=\paperwidth,height=\paperheight]
\startsetups layer
\setlayer[headerfooter][preset=lefttop,x=4in,y=1in]%
{\framed[frame=off,width=1.25in,align=middle,offset=none]{\tfd Page~
\pagenumber~of~\totalnumberofpages}}
\stopsetups
\starttext
\startstandardmakeup
\tfd THIS IS A TITLE PAGE
\page
\stopstandardmakeup
\setupbackgrounds[page][setups=layer,background={headerfooter}]
\dorecurse{2}{\page[empty]}
\stoptext
Mike
On Tue, Feb 3, 2009 at 4:36 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 03.02.2009 um 07:50 schrieb Michael Bynum:
>
>> 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.
>
>
> You can find a solution from Aditya under the following link:
>
> http://archive.contextgarden.net/message/20070714.145156.91a20ef2.en.html
>
> I wrote also for myself a short test file for myself a while ago.
>
> \definelayer[head] [width=\paperwidth,height=\paperheight]
> \definelayer[nexthead][width=\paperwidth,height=\paperheight]
>
> \startsetups layer
>
> \doif {\pagenumber}{1}{\setlayer[head] [offset=2cm]{First page}}
> \doifnot{\pagenumber}{1}{\setlayer[nexthead][offset=2cm]{Page \pagenumber}}
>
> \stopsetups
>
> \setupbackgrounds[page][setups=layer,background={head,nexthead}]
>
> \starttext
> \dorecurse{4}{\page[empty]}
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Page number not updating in layer
2009-02-03 15:36 ` Michael Bynum
@ 2009-02-03 16:21 ` Wolfgang Schuster
2009-02-03 16:35 ` Michael Bynum
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2009-02-03 16:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 03.02.2009 um 16:36 schrieb Michael Bynum:
> Great that fixed it. Sorry about the subject by the way. I thought
> it would auto add the mailing list prefix.
>
> I still can't get the total number of pages to work out right if I
> have a title page. I used standardmakeup to keep the title page from
> being numbered, but it is still counted in \totalnumberofpages.
Use \lastpagenumber.
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Page number not updating in layer
2009-02-03 16:21 ` Wolfgang Schuster
@ 2009-02-03 16:35 ` Michael Bynum
0 siblings, 0 replies; 5+ messages in thread
From: Michael Bynum @ 2009-02-03 16:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
Ah ha. That works perfectly. Thank you.
Mike
On Tue, Feb 3, 2009 at 11:21 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 03.02.2009 um 16:36 schrieb Michael Bynum:
>
>> Great that fixed it. Sorry about the subject by the way. I thought
>> it would auto add the mailing list prefix.
>>
>> I still can't get the total number of pages to work out right if I
>> have a title page. I used standardmakeup to keep the title page from
>> being numbered, but it is still counted in \totalnumberofpages.
>
> Use \lastpagenumber.
>
> Wolfgang
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-03 16:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-03 6:50 Page number not updating in layer Michael Bynum
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
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).