ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Adjust pagenumbering while skipping first page
@ 2023-09-04 16:09 Jeroen
  2023-09-04 16:41 ` [NTG-context] " Pablo Rodriguez
  2023-09-04 17:00 ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 4+ messages in thread
From: Jeroen @ 2023-09-04 16:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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

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

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

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

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

* [NTG-context] Re: Adjust pagenumbering while skipping first page
  2023-09-04 16:09 [NTG-context] Adjust pagenumbering while skipping first page Jeroen
@ 2023-09-04 16:41 ` Pablo Rodriguez
  2023-09-04 22:03   ` Jeroen
  2023-09-04 17:00 ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 4+ messages in thread
From: Pablo Rodriguez @ 2023-09-04 16:41 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

* [NTG-context] Re: Adjust pagenumbering while skipping first page
  2023-09-04 16:09 [NTG-context] Adjust pagenumbering while skipping first page Jeroen
  2023-09-04 16:41 ` [NTG-context] " Pablo Rodriguez
@ 2023-09-04 17:00 ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2023-09-04 17:00 UTC (permalink / raw)
  To: Jeroen, mailing list for ConTeXt users; +Cc: Hans Hagen

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
___________________________________________________________________________________

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

* [NTG-context] Re: Adjust pagenumbering while skipping first page
  2023-09-04 16:41 ` [NTG-context] " Pablo Rodriguez
@ 2023-09-04 22:03   ` Jeroen
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen @ 2023-09-04 22:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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 <oinos@gmx.es>:

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

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

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

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

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

end of thread, other threads:[~2023-09-04 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04 16:09 [NTG-context] Adjust pagenumbering while skipping first page Jeroen
2023-09-04 16:41 ` [NTG-context] " Pablo Rodriguez
2023-09-04 22:03   ` Jeroen
2023-09-04 17:00 ` Hans Hagen via ntg-context

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