From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107669 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: problem with counters (page) Date: Wed, 10 Jun 2020 11:04:35 -0400 Message-ID: References: <526665FC-759C-4B90-8F64-70B8E9DD572F@elvenkind.com> <268072AF-7A0E-4FF7-B1BE-7B409E271AC7@elvenkind.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9099510197172140972==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11920"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 10 17:05:19 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jj2I2-0002xb-Mj for gctc-ntg-context-518@m.gmane-mx.org; Wed, 10 Jun 2020 17:05:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8B1571631F1; Wed, 10 Jun 2020 17:04:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UrnxuI6hff2c; Wed, 10 Jun 2020 17:04:50 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 75C501631E8; Wed, 10 Jun 2020 17:04:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9A8CE1631E8 for ; Wed, 10 Jun 2020 17:04:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wA7Hi6GfV_Zx for ; Wed, 10 Jun 2020 17:04:47 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.50; helo=mail-ed1-f50.google.com; envelope-from=bowenalan03@gmail.com; receiver= Original-Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9AD431631DA for ; Wed, 10 Jun 2020 17:04:47 +0200 (CEST) Original-Received: by mail-ed1-f50.google.com with SMTP id o26so1644421edq.0 for ; Wed, 10 Jun 2020 08:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qRhBSw/J5d6BBpOj9nwiQA2wBK3nymaOkyqyxz9mUpU=; b=XWxDcK6SqYmute1zVQRVEBLQydkPQrGxliPVA+XB0DQBE4x6ru8W7AVWan6BgO/QMG a99k032mfsNJ4HVcUg5oS8s5/G5XGlvPGJrVC+4qFwn6fanv8O6FQj23IVkWXWa6qEKr wU0JKtBr+oS3zswQ51Uewv5yGK+zvVIMFsldSAI60hVU0CismOAfcCCOl+6qJfCTBqbh 6SxqHSYQcsL+DVu3NMxcZvPi4wZvvpabcbjHMZIaeTOhaKnNLtWDE5+ca8s/of9CaATh RknZm8DeDCNARGTM4H+rt45OuOkgu8FOy8rqICcDj8xz83Onfm4SW7lWeGWTFGrV8HCq Qigw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qRhBSw/J5d6BBpOj9nwiQA2wBK3nymaOkyqyxz9mUpU=; b=edYTpiQ3wYM7FD3VoGN/uHpOlwZQIFDCMBiA/YF7OTlWXafhL7wSjhQPiy6M65j2Aw zIcuYlA4EbYabZzaQoWWGCwGk80+DoexwgmJL+wxErewaf+ScxLqH1m/mFmr9ExUJe3j rX4xscK6b1dZgB7dJx7gUFZG2pFtmlZgsx0ojLaIhL2cR7Vkv9qYgAICUxfAfiTQPYwC 44md4ubluQAjmYgwaAo8ra7Rj1JIZ6TT+Dwdd4891uMj+14q3cp67vx1/2UElOAnSIwC p1K4Lnod+eEiWMlCEd/h+wGYEG5Ug0T8sT4+DlAOtUjNr6ScpRhNPZkVRdy9qscDsuBJ Eh/Q== X-Gm-Message-State: AOAM530+xaTdCHwqDK+gsOlzFk/68EotDWyP+s9RZP2mIGyqZcsz9QDf TSTR142b/akjQ3mFAbaccNNwex2NdSgV9mWvnroSm0tx X-Google-Smtp-Source: ABdhPJyqb1R4JGIIHZUiOHpUQxKb208Ol0dfk6mKqd04vsLZ8X9H64ysBzWgC1mKvz1BMUw5BLA2Jygug4Xp87iCgwQ= X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr2749343edb.35.1591801486835; Wed, 10 Jun 2020 08:04:46 -0700 (PDT) In-Reply-To: <268072AF-7A0E-4FF7-B1BE-7B409E271AC7@elvenkind.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107669 Archived-At: --===============9099510197172140972== Content-Type: multipart/alternative; boundary="0000000000002d055e05a7bc2a88" --0000000000002d055e05a7bc2a88 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, Taco! That works in my mwe. I added way=3Dbytext 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 wrote: > Hi Alan, > > Sorry, I should have actually tried your MWE. You do *not* want > way=3Dbypage 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=3Dpage] > \starttext > \setcounter[volpage][5] > \dorecurse{3}{\startTEXpage[offset=3D2pc] > \input ward > \blank[medium] > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > \stopTEXpage} > \stoptext > > > > On 10 Jun 2020, at 15:05, Alan Bowen wrote: > > > > Hi, Taco=E2=80=94 > > > > Thanks for the suggestion. I have tried it with \incrementcounter befor= e > 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=3Dpage, way=3Dbypage] > > \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 > wrote: > > Hi, > > > > Incrementing the counter outside of the TEXpage should work. > > > > Best wishes, > > Taco > > > > > On 9 Jun 2020, at 23:34, Alan Bowen 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=3Dpage, way=3Dbypage] > > > \starttext > > > \setcounter[volpage][5] > > > \dorecurse{3}{\startTEXpage[offset=3D2pc] > > > \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 entr= y > 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 > > _________________________________________________________________________= __________ > --0000000000002d055e05a7bc2a88 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, Taco! That works in my mwe. I added way=3Dbytext i= n 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=3Dbypage 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=3Dpage]
\starttext
\setcounter[volpage][5]
\dorecurse{3}{\startTEXpage[offset=3D2pc]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \input ward
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \blank[medium]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \centerline{\red\tfa\rawco= unter[volpage]\incrementcounter[volpage]}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopTEXpage}
\stoptext


> On 10 Jun 2020, at 15:05, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> Hi, Taco=E2=80=94
>
> Thanks for the suggestion. I have tried it with \incrementcounter befo= re and after the TEXpage. Sadly, neither worked.
>
> This mwe is an attempt to capture the failure of the following in proc= essing a product with numerous components:
>
> \definecounter[volpage][type=3Dpage, way=3Dbypage]
> \setupfootertexts[text]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[{\centerline{\raise\NumberRaise\hbox{\rawco= unter[volpage]}}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0\incrementcounter[volpage]}]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[{\centerline{\raise\NumberRaise\hbox{\rawco= unter[volpage]}}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0\incrementcounter[volpage]}]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[]=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>=C2=A0
> 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 b= ook are not proving successful. The following code shows the nature of the = problem.
> >
> > \definecounter[volpage][type=3Dpage, way=3Dbypage]
> > \starttext
> > \setcounter[volpage][5]
> > \dorecurse{3}{\startTEXpage[offset=3D2pc]
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\input ward=
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\blank[medi= um]
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\centerline= {\red\tfa\rawcounter[volpage]\incrementcounter[volpage]}
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\stopTEXpag= e}
> > \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/l= istinfo/ntg-context
> > webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanh= et.net
> > archive=C2=A0 : https://bitbucket.org/phg= /context-mirror/commits/
> > wiki=C2=A0 =C2=A0 =C2=A0: 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/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: 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/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--0000000000002d055e05a7bc2a88-- --===============9099510197172140972== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============9099510197172140972==--