···<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 <home...@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: pgpbRw0CY9Soy.pgp
Description: PGP signature

___________________________________________________________________________________
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 via email to