* problem with counters (page)
@ 2020-06-09 21:34 Alan Bowen
2020-06-10 7:12 ` Taco Hoekwater
0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2020-06-09 21:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 524 bytes --]
My efforts to set up a new page counter in the footertexts of a book are
not proving successful. The following code shows the nature of the problem.
\definecounter[volpage][type=page, way=bypage]
\starttext
\setcounter[volpage][5]
\dorecurse{3}{\startTEXpage[offset=2pc]
\input ward
\blank[medium]
\centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
\stopTEXpage}
\stoptext
As you will see, the counter is not incremented on pages 2 and 3.
I expect that I have missed something important. But what?
Alan
[-- Attachment #1.2: Type: text/html, Size: 2154 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with counters (page)
2020-06-09 21:34 problem with counters (page) Alan Bowen
@ 2020-06-10 7:12 ` Taco Hoekwater
2020-06-10 13:05 ` Alan Bowen
0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2020-06-10 7:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Incrementing the counter outside of the TEXpage should work.
Best wishes,
Taco
> On 9 Jun 2020, at 23:34, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> My efforts to set up a new page counter in the footertexts of a book are not proving successful. The following code shows the nature of the problem.
>
> \definecounter[volpage][type=page, way=bypage]
> \starttext
> \setcounter[volpage][5]
> \dorecurse{3}{\startTEXpage[offset=2pc]
> \input ward
> \blank[medium]
> \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> \stopTEXpage}
> \stoptext
>
> As you will see, the counter is not incremented on pages 2 and 3.
>
> I expect that I have missed something important. But what?
>
> Alan
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
Taco Hoekwater
Elvenkind BV
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with counters (page)
2020-06-10 7:12 ` Taco Hoekwater
@ 2020-06-10 13:05 ` Alan Bowen
2020-06-10 13:44 ` Taco Hoekwater
0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2020-06-10 13:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2645 bytes --]
Hi, Taco—
Thanks for the suggestion. I have tried it with \incrementcounter before
and after the TEXpage. Sadly, neither worked.
This mwe is an attempt to capture the failure of the following in
processing a product with numerous components:
\definecounter[volpage][type=page, way=bypage]
\setupfootertexts[text]
[]
[{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
\incrementcounter[volpage]}]
[{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
\incrementcounter[volpage]}]
[]
If your suggestion had worked, I would have had difficulty in applying it.
Alan
On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater <taco@elvenkind.com> wrote:
> Hi,
>
> Incrementing the counter outside of the TEXpage should work.
>
> Best wishes,
> Taco
>
> > On 9 Jun 2020, at 23:34, Alan Bowen <bowenalan03@gmail.com> wrote:
> >
> > My efforts to set up a new page counter in the footertexts of a book are
> not proving successful. The following code shows the nature of the problem.
> >
> > \definecounter[volpage][type=page, way=bypage]
> > \starttext
> > \setcounter[volpage][5]
> > \dorecurse{3}{\startTEXpage[offset=2pc]
> > \input ward
> > \blank[medium]
> >
> \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> > \stopTEXpage}
> > \stoptext
> >
> > As you will see, the counter is not incremented on pages 2 and 3.
> >
> > I expect that I have missed something important. But what?
> >
> > Alan
> >
> ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> >
> ___________________________________________________________________________________
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 6164 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with counters (page)
2020-06-10 13:05 ` Alan Bowen
@ 2020-06-10 13:44 ` Taco Hoekwater
2020-06-10 15:04 ` Alan Bowen
0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2020-06-10 13:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Alan,
Sorry, I should have actually tried your MWE. You do *not* want
way=bypage here, as that resets the counter to one at the start
of the next page (it is useful for footnotes that are numbered
per-page, but not for actual page counters).
\definecounter[volpage][type=page]
\starttext
\setcounter[volpage][5]
\dorecurse{3}{\startTEXpage[offset=2pc]
\input ward
\blank[medium]
\centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
\stopTEXpage}
\stoptext
> On 10 Jun 2020, at 15:05, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> Hi, Taco—
>
> Thanks for the suggestion. I have tried it with \incrementcounter before and after the TEXpage. Sadly, neither worked.
>
> This mwe is an attempt to capture the failure of the following in processing a product with numerous components:
>
> \definecounter[volpage][type=page, way=bypage]
> \setupfootertexts[text]
> []
> [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
> \incrementcounter[volpage]}]
> [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
> \incrementcounter[volpage]}]
> []
>
> If your suggestion had worked, I would have had difficulty in applying it.
>
> Alan
>
> On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater <taco@elvenkind.com> wrote:
> Hi,
>
> Incrementing the counter outside of the TEXpage should work.
>
> Best wishes,
> Taco
>
> > On 9 Jun 2020, at 23:34, Alan Bowen <bowenalan03@gmail.com> wrote:
> >
> > My efforts to set up a new page counter in the footertexts of a book are not proving successful. The following code shows the nature of the problem.
> >
> > \definecounter[volpage][type=page, way=bypage]
> > \starttext
> > \setcounter[volpage][5]
> > \dorecurse{3}{\startTEXpage[offset=2pc]
> > \input ward
> > \blank[medium]
> > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> > \stopTEXpage}
> > \stoptext
> >
> > As you will see, the counter is not incremented on pages 2 and 3.
> >
> > I expect that I have missed something important. But what?
> >
> > Alan
> > ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > ___________________________________________________________________________________
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
Taco Hoekwater
Elvenkind BV
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with counters (page)
2020-06-10 13:44 ` Taco Hoekwater
@ 2020-06-10 15:04 ` Alan Bowen
2020-06-10 15:13 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2020-06-10 15:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 4873 bytes --]
Thanks, Taco! That works in my mwe. I added way=bytext in my env file and
the output is just what I need.
Best, Alan
On Wed, Jun 10, 2020 at 9:44 AM Taco Hoekwater <taco@elvenkind.com> wrote:
> Hi Alan,
>
> Sorry, I should have actually tried your MWE. You do *not* want
> way=bypage here, as that resets the counter to one at the start
> of the next page (it is useful for footnotes that are numbered
> per-page, but not for actual page counters).
>
>
> \definecounter[volpage][type=page]
> \starttext
> \setcounter[volpage][5]
> \dorecurse{3}{\startTEXpage[offset=2pc]
> \input ward
> \blank[medium]
>
> \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> \stopTEXpage}
> \stoptext
>
>
> > On 10 Jun 2020, at 15:05, Alan Bowen <bowenalan03@gmail.com> wrote:
> >
> > Hi, Taco—
> >
> > Thanks for the suggestion. I have tried it with \incrementcounter before
> and after the TEXpage. Sadly, neither worked.
> >
> > This mwe is an attempt to capture the failure of the following in
> processing a product with numerous components:
> >
> > \definecounter[volpage][type=page, way=bypage]
> > \setupfootertexts[text]
> > []
> > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
> > \incrementcounter[volpage]}]
> > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}}
> > \incrementcounter[volpage]}]
> > []
> >
> > If your suggestion had worked, I would have had difficulty in applying
> it.
> >
> > Alan
> >
> > On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater <taco@elvenkind.com>
> wrote:
> > Hi,
> >
> > Incrementing the counter outside of the TEXpage should work.
> >
> > Best wishes,
> > Taco
> >
> > > On 9 Jun 2020, at 23:34, Alan Bowen <bowenalan03@gmail.com> wrote:
> > >
> > > My efforts to set up a new page counter in the footertexts of a book
> are not proving successful. The following code shows the nature of the
> problem.
> > >
> > > \definecounter[volpage][type=page, way=bypage]
> > > \starttext
> > > \setcounter[volpage][5]
> > > \dorecurse{3}{\startTEXpage[offset=2pc]
> > > \input ward
> > > \blank[medium]
> > >
> \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> > > \stopTEXpage}
> > > \stoptext
> > >
> > > As you will see, the counter is not incremented on pages 2 and 3.
> > >
> > > I expect that I have missed something important. But what?
> > >
> > > Alan
> > >
> ___________________________________________________________________________________
> > > 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://context.aanhet.net
> > > archive : https://bitbucket.org/phg/context-mirror/commits/
> > > wiki : http://contextgarden.net
> > >
> ___________________________________________________________________________________
> >
> > Taco Hoekwater
> > Elvenkind BV
> >
> >
> >
> >
> >
> ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive : https://bitbucket.org/phg/context-mirror/commits/
> > 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://context.aanhet.net
> > archive : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> >
> ___________________________________________________________________________________
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 8164 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with counters (page)
2020-06-10 15:04 ` Alan Bowen
@ 2020-06-10 15:13 ` Wolfgang Schuster
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2020-06-10 15:13 UTC (permalink / raw)
To: mailing list for ConTeXt users, Alan Bowen
Alan Bowen schrieb am 10.06.2020 um 17:04:
> Thanks, Taco! That works in my mwe. I added way=bytext in my env file
> and the output is just what I need.
Why don't you use sub pages?
\starttext
%\setupsubpagenumber[start=5]\resetsubpagenumber
\setcounter[subpage][5]
\startTEXpage
\samplefile{ward}
\blank
\midaligned{\subpagenumber}
\stopTEXpage
\startTEXpage
\samplefile{ward}
\blank
\midaligned{\subpagenumber}
\stopTEXpage
\stoptext
Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-10 15:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 21:34 problem with counters (page) Alan Bowen
2020-06-10 7:12 ` Taco Hoekwater
2020-06-10 13:05 ` Alan Bowen
2020-06-10 13:44 ` Taco Hoekwater
2020-06-10 15:04 ` Alan Bowen
2020-06-10 15:13 ` Wolfgang Schuster
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).