Adjust pagenumbering while skipping first page
![](https://secure.gravatar.com/avatar/23f3c94004546871c844e5ccc22873eb.jpg?s=120&d=mm&r=g)
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 9/4/23 18:09, Jeroen wrote:
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1?
Hi Jeroen, this might do the work (LMTX only): [\pagenumber{} of \the\numexpr{\totalnumberofpages - 1}] For MkIV, you would need: [\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax] Just in case it helps, Pablo
![](https://secure.gravatar.com/avatar/23f3c94004546871c844e5ccc22873eb.jpg?s=120&d=mm&r=g)
Pablo,
Thanks, even though I use LMTX, only this form works:
[\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax]
Thanks
Jeroen
Op ma 4 sep 2023 om 18:43 schreef Pablo Rodriguez
On 9/4/23 18:09, Jeroen wrote:
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1?
Hi Jeroen,
this might do the work (LMTX only):
[\pagenumber{} of \the\numexpr{\totalnumberofpages - 1}]
For MkIV, you would need:
[\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax]
Just in case it helps,
Pablo
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
On 9/4/2023 6:09 PM, Jeroen wrote:
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1?
\setupfootertexts [title] [\pagenumber{} of \totalnumberofpages]
\setcounter [userpage] [0]
\setuppagenumbering [location=]
\startdocument
\setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start]
\startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter
\stopdocument \setupfootertexts [title] [\pagenumber\space of \lastpagenumber]
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Jeroen
-
Pablo Rodriguez