From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: problem with counters (page)
Date: Wed, 10 Jun 2020 15:44:05 +0200 [thread overview]
Message-ID: <268072AF-7A0E-4FF7-B1BE-7B409E271AC7@elvenkind.com> (raw)
In-Reply-To: <CAFMOkGUathNkZeNvyLreAnN0rBG_g_mPq1bw9=JqhmjmdJdyVw@mail.gmail.com>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2020-06-10 13:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 21:34 Alan Bowen
2020-06-10 7:12 ` Taco Hoekwater
2020-06-10 13:05 ` Alan Bowen
2020-06-10 13:44 ` Taco Hoekwater [this message]
2020-06-10 15:04 ` Alan Bowen
2020-06-10 15:13 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=268072AF-7A0E-4FF7-B1BE-7B409E271AC7@elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).