[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread Jeroen
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
>
> ___
___
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
___

[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread Hans Hagen via ntg-context

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
-

___
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
___


[NTG-context] Re: Adjust pagenumbering while skipping first page

2023-09-04 Thread 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
___