ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Page X of Y
@ 2011-06-21 20:18 Troy Henderson
  2011-06-21 20:30 ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Troy Henderson @ 2011-06-21 20:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I would like the footer of my document to read

Page X of Y

where X is the current page and Y is the total number of pages.
Thoughts on how to accomplish this?

Thanks,

Troy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Page X of Y
  2011-06-21 20:18 Page X of Y Troy Henderson
@ 2011-06-21 20:30 ` Aditya Mahajan
  2011-06-21 20:32   ` Troy Henderson
  2011-06-21 20:37   ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Aditya Mahajan @ 2011-06-21 20:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 21 Jun 2011, Troy Henderson wrote:

> I would like the footer of my document to read
>
> Page X of Y
>
> where X is the current page and Y is the total number of pages.
> Thoughts on how to accomplish this?

1.

\setuppagenumbering[location=footer, command=\PAGECOMMAND]
\def\PAGECOMMAND#1{Page #1 of \lastpage}


2. Or more directly

   \setuppagenumbering[location=]
   \setupfootertexts[Page \currentpage\ of \lastpage]


Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Page X of Y
  2011-06-21 20:30 ` Aditya Mahajan
@ 2011-06-21 20:32   ` Troy Henderson
  2011-06-21 20:37   ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Troy Henderson @ 2011-06-21 20:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you.  The only problem that I'm encountering now is that I am
using \startstandardmakeup ... \stopstandardmakeup on the first
(title) page, and thus \lastpage is 1 too many.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Page X of Y
  2011-06-21 20:30 ` Aditya Mahajan
  2011-06-21 20:32   ` Troy Henderson
@ 2011-06-21 20:37   ` Wolfgang Schuster
  2011-06-21 20:39     ` Troy Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2011-06-21 20:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.06.2011 um 22:30 schrieb Aditya Mahajan:

> On Tue, 21 Jun 2011, Troy Henderson wrote:
> 
>> I would like the footer of my document to read
>> 
>> Page X of Y
>> 
>> where X is the current page and Y is the total number of pages.
>> Thoughts on how to accomplish this?
> 
> 1.
> 
> \setuppagenumbering[location=footer, command=\PAGECOMMAND]
> \def\PAGECOMMAND#1{Page #1 of \lastpage}

\define[1]\PAGECOMMAND{Page #1 of \lastpage}

> 2. Or more directly
> 
>  \setuppagenumbering[location=]
>  \setupfootertexts[Page \currentpage\ of \lastpage]

3. \setuppagenumbering[left={Page },right={ of \lastpage}]

4. \setuplabeltext[pagenumber={{Page },{ of \lastpage}}]

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Page X of Y
  2011-06-21 20:37   ` Wolfgang Schuster
@ 2011-06-21 20:39     ` Troy Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Henderson @ 2011-06-21 20:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you (again).  It seems that

\setupfootertexts[Page \pagenumber~of~\lastpagenumber]

also works.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-21 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 20:18 Page X of Y Troy Henderson
2011-06-21 20:30 ` Aditya Mahajan
2011-06-21 20:32   ` Troy Henderson
2011-06-21 20:37   ` Wolfgang Schuster
2011-06-21 20:39     ` Troy Henderson

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).