ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Total Number of Pages
@ 2012-10-16 20:02 Nicholas Ulle
  2012-10-16 20:12 ` Marco Patzer
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Ulle @ 2012-10-16 20:02 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 250 bytes --]

Hi,

How would I go about inserting the total number of pages in my document? I
assume this would require two passes of texec or context. I've tried
Googling and checking ConTeXt garden, but couldn't find anything regarding
this.

Thanks again,
Nick

[-- Attachment #1.2: Type: text/html, Size: 319 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 4+ messages in thread

* Re: Total Number of Pages
  2012-10-16 20:02 Total Number of Pages Nicholas Ulle
@ 2012-10-16 20:12 ` Marco Patzer
  2012-10-16 20:18   ` Hrothgar Boyce
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Patzer @ 2012-10-16 20:12 UTC (permalink / raw)
  To: ntg-context

2012-10-16 Nicholas Ulle:

Hi Nicholas

> How would I go about inserting the total number of pages in my document?

\lastpage


Marco

___________________________________________________________________________________
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] 4+ messages in thread

* Re: Total Number of Pages
  2012-10-16 20:12 ` Marco Patzer
@ 2012-10-16 20:18   ` Hrothgar Boyce
  2012-10-16 20:47     ` Philipp Gesang
  0 siblings, 1 reply; 4+ messages in thread
From: Hrothgar Boyce @ 2012-10-16 20:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I've not tested this, but suspect that there may be a difference
between the below two commands
  \lastpage          and
  \totalnumberofpages

possibly depending on whether title pages or preambles are counted.

On Tue, Oct 16, 2012 at 1:12 PM, Marco Patzer <homerow@lavabit.com> wrote:
> 2012-10-16 Nicholas Ulle:
>
> Hi Nicholas
>
>> How would I go about inserting the total number of pages in my document?
>
> \lastpage
>
>
> Marco
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 4+ messages in thread

* Re: Total Number of Pages
  2012-10-16 20:18   ` Hrothgar Boyce
@ 2012-10-16 20:47     ` Philipp Gesang
  0 siblings, 0 replies; 4+ messages in thread
From: Philipp Gesang @ 2012-10-16 20:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2119 bytes --]

···<date: 2012-10-16, Tuesday>···<from: Hrothgar Boyce>···

> I've not tested this, but suspect that there may be a difference
> between the below two commands
>   \lastpage          and
>   \totalnumberofpages

These are actually synonyms ;-) But it’s true, there is the
difference between counting the real pages (the number of sheets
you need to print the pdf) and the user pages:

·································································
\setuphead[section][page=yes]%% for testing
\setuppagenumber[state=stop]
\starttext

%% synonyms: \lastpage, \lastrealpage, \nofrealpages
last real page:  \totalnumberofpages \par
%% synonyms: \nofuserpages, \lastuserpagenumber
last user  page: \lastpagenumber\par
%% for sake of completeness
first real page \firstpage  \par

\chapter{no counting}
\dorecurse{5}{%
  \section{iteration \recurselevel}
  \starttable[|l|l|]
    \NC counter    \NC value            \NC\NR
    \NC userpageno \NC \realpagenumber  \NC\NR
    \NC pageno     \NC \userpagenumber  \NC\NR
  \stoptable
}

\setuppagenumber[state=start]
\chapter{counting enabled}
\dorecurse{5}{%
  \section{iteration \recurselevel}
  \starttable[|l|l|]
    \NC counter    \NC value            \NC\NR
    \NC userpageno \NC \realpagenumber  \NC\NR
    \NC pageno     \NC \userpagenumber  \NC\NR
  \stoptable
}
·································································

There are further counters and synonyms, all defined in
strc-pag.mkiv.

Regards
Philipp



> possibly depending on whether title pages or preambles are counted.
> 
> On Tue, Oct 16, 2012 at 1:12 PM, Marco Patzer <homerow@lavabit.com> wrote:
> > 2012-10-16 Nicholas Ulle:
> >
> > Hi Nicholas
> >
> >> How would I go about inserting the total number of pages in my document?
> >
> > \lastpage
> >
> >
> > Marco
> >
-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2012-10-16 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 20:02 Total Number of Pages Nicholas Ulle
2012-10-16 20:12 ` Marco Patzer
2012-10-16 20:18   ` Hrothgar Boyce
2012-10-16 20:47     ` Philipp Gesang

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