From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 4556F27373 for ; Wed, 3 Apr 2024 17:20:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 3A56A4840BC for ; Wed, 3 Apr 2024 17:18:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ERANUgyOM0CI for ; Wed, 3 Apr 2024 17:18:09 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 29D13483EF1 for ; Wed, 3 Apr 2024 17:17:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 2210D483DD0 for ; Wed, 3 Apr 2024 17:16:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BQ9YR0_ZrK_u for ; Wed, 3 Apr 2024 17:16:31 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.48; helo=mail-wr1-f48.google.com; envelope-from=bowenalan03@gmail.com; receiver= Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 9696B483DCB for ; Wed, 3 Apr 2024 17:16:31 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3439ce73766so401837f8f.2 for ; Wed, 03 Apr 2024 08:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712157390; x=1712762190; darn=ntg.nl; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=w47XamVcjts/6XauSgLiDwPs4M6EPnIY06rLUnPSLwo=; b=CDLlEHghVOBjKPovJJTdhgOskidMK9gnz1fXx0qrC5tcWTVUwipyUZXS6agbNF87Ir HeOT0Be5fsg7v7meaj1dkZhJWm1uoCxfZ4L8IHFJzD+FqDdoxCWP/d3PVY1kxP1khxd7 2aq2iGenhY0G7WKrlN9YeAQ8eIBXf/+6EGMvNXAw857tJe2UovF4gSpq4Fc3Vd2sUU6y K3IfHQqvjthqaTrmgtiNFskhK085wBGwHFEQ6LriXejCVm+O9ccpx67BWPxuztWN1gFE IAn7o88/Dcdie8pEEQdNBpw2FwJ3DoKkMkXoLZ7jl030ZR/tbBpk4n29XmAXzlUjjEy0 GKXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712157390; x=1712762190; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w47XamVcjts/6XauSgLiDwPs4M6EPnIY06rLUnPSLwo=; b=AQO457oqdXrSuCGKfwtc0jnimpDN2ueJVXsOkE88enEVySBuT/ktWKr1ztn7+F7ZFS /hffZug+bvvzT83x65YrIcRpfMON2530W8fdVRsZUJu7F8CD7iKwI3svNyxf5t1zXzeX fPD/JG1cfztxdedBQCc7vfYFHWxr+V8dvNDAWd96Yu4UAKYzjxfd1bdzOvHTM3w+QmyW Uv85+Pp1TbxnXMh3aDK44C4iCzeZtEjAXp7i/T1u+s77IqiHsHn2wGOtX4NgA/jwxv3K gkoPY38y+yTGNnizwyah0jmydy7vFHTIEJ3CimcsvNrJble+8jQq6LpvRzbomu1vWoFq qDmw== X-Gm-Message-State: AOJu0YzXmbbR1YizID0vP0cDaZRo9/F+42ozICHO42Slm3NXumjKFr+P VdCAhorqw58tucDKepsFG1SzreZMO6OmHOD4EhoS2J4gnZphZ984gqsysAy9jyMxxKns6psacyp w0pr/uFC4d1ifrGC7ZOND9yb0FY6Li3wFd3o= X-Google-Smtp-Source: AGHT+IEHsnWQuDxFkdmEyoQZ6vB/KHvYTzsvMD7vrnaGaAlJSiL/8bjt3P97/Q/E78o4DIZK/N+/y2+zTG4AlLP69Y0= X-Received: by 2002:a05:6000:1241:b0:343:7b45:5f16 with SMTP id j1-20020a056000124100b003437b455f16mr2582239wrx.23.1712157390379; Wed, 03 Apr 2024 08:16:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Bowen Date: Wed, 3 Apr 2024 11:16:18 -0400 Message-ID: To: mailing list for ConTeXt users Message-ID-Hash: 2333IMLYYUGMJWFCATSYYIRE5GIJOCU5 X-Message-ID-Hash: 2333IMLYYUGMJWFCATSYYIRE5GIJOCU5 X-MailFrom: bowenalan03@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: last page number for a list List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============5589160535727824527==" --===============5589160535727824527== Content-Type: multipart/alternative; boundary="0000000000000da520061532b5ed" --0000000000000da520061532b5ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Bruce=E2=80=94 This does not quite work=E2=80=94the page numbers are those of the first pa= ge of the chapter, not the last. But thanks for the tip about \writetolist. Perhaps I can get that to work. What I need are ToC entries like AuthorName ShortTitle 1=E2=80=936 I need this pagination because one of the requirements of continuous publication on the OJS is that once an item is published changes are not permitted. So I cannot go with normal continuous publication since, for us anyway, items are not processed in strict sequential order (e,g., we may have, paper+paper+ review+paper...) If it helps: I currently have \startFMTitle[reference=3D\Reference, title=3D{}][itemAuthor=3DAuthorName, itemTitle=3DShortTitle,...] \setuplist[FMTitle][state=3Dstart, alternative=3Dstartendfmpages, criterium=3Dall,] (\Reference is defined at the in the preamble to input of the file/component.) \definelistalternative[startendfmpages][renderingsetup=3Dlist:startendfmpag= es] \startsetups[list:startendfmpages] \structurelistuservariable{itemAuthor}\crlf \structurelistuservariable{itemTitle}\hfill% \at[\currentlistentrypagenumber]=E2=80=93\at[\lastpagenumber] \vglue1pc \stopsetups where I have \reference[\lastpagenumber]{} at the end of the file. But this gives me ??=E2=80=93viii (the viii is correct and interactive) for the FMTi= tle. Sadly the entries for all my other Titles (SourceTitle, StudyTitle...) is ??=E2=80=93viii. (Each title is a modified chapter.) Curiously, \at[\Reference]=E2=80=93\convertnumber{r}{\lastpagenumber} and \at[\Reference]=E2=80=93\at[\lastpagenumber] work properly in the body text= . The overall structure is project-product sort with many components in the product. This is probably TMI. The bottom line is that I am truly stumped. All best, Alan On Wed, Apr 3, 2024 at 6:56=E2=80=AFAM Bruce Horrocks w= rote: > > > > On 30 Mar 2024, at 19:59, Alan Bowen wrote: > > > > How can I get the last page number of a chapter for a list (ToC)? > > > > Outside of a list, I use \lastpagenumber. > > But that does not work in a list such as the ToC. > > > > Any tips or pointers will be gladly received. > > > I'm not quite sure what you want to do with these numbers: something like > printing out a contents page but instead of the start page of a chapter i= t > shows the last page of the chapter? > > If so then try creating a custom list and use \writetolist immediately > before each \stopchapter command? > > \definelist[LastPages][criterium=3Dall] > \starttext > \completecontent > \page > \completelist[LastPages] > \page > \dorecurse{10}{ > \startchapter[title=3D{This is my chapter}] > This is a chapter\par \dorecurse{6}{\input knuth } \input > math-kontinuitet-sv > > \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}} > \stopchapter > } > \stoptext > > But I can't get the number option of \writetolist to work - the "3." abov= e > is ignored. :-( > > =E2=80=94 > Bruce Horrocks > Hampshire, UK > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror= ) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > _________________________________________________________________________= __________ > --0000000000000da520061532b5ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Bruce=E2=80=94
This does not quite work=E2=80=94t= he page numbers are those of the first page of the chapter, not the last. B= ut thanks for the tip about \writetolist. Perhaps I can get that to work.

What I need are ToC entries like
AuthorName
ShortTi= tle =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 1=E2=80=936

I need this pagination because one of the= requirements of continuous publication on the OJS is that once an item is = published changes are not permitted. So I cannot go with normal continuous = publication since, for us anyway, items are not processed in strict sequent= ial order (e,g., we may have, paper+paper+=C2=A0review+paper...)

<= /div>
If it helps: I currently=C2=A0have

\startFMTitle[refere= nce=3D\Reference, title=3D{}][itemAuthor=3DAuthorName, itemTitle=3DShortTit= le,...]
\setuplist[FMTitle][state=3Dstart, alternative=3Dstartendfmpag= es, criterium=3Dall,]
(\Reference is defined at the in the preamble to input of the fi= le/component.)

\definelistalternative[startendfmpages][renderi= ngsetup=3Dlist:startendfmpages]

\startsetups[list:startendfmpage= s]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \structurelistuservariable{itemAut= hor}\crlf
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \structurelistuservariable{= itemTitle}\hfill%
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\at[\currentl= istentrypagenumber]=E2=80=93\at[\lastpagenumber]
\vglue1pc
\stopsetup= s
where I have=C2=A0\reference[\lastpagenumber]{} at the end of the file. But this=C2= =A0
gives me ??=E2=80=93viii (the viii is correct and interacti= ve) for the FMTitle. Sadly the entries for all my other Titles (SourceTitle= , StudyTitle...) is ??=E2=80=93viii.=C2=A0
(Each title is a modified c= hapter.)

Curiously,=C2=A0\at[\Reference]=E2=80=93\convertnumber{r}{\lastpagenumber} =C2=A0and= =C2=A0\at[\Re= ference]=E2=80=93\at[\lastpagenumber]=C2=A0work properly in the body text. =C2=A0=
The overall st= ructure=C2=A0is project-product sort with many components in the product.

This is prob= ably TMI. The=C2=A0bottom line is that I am truly stumped.

All best,
Alan
On Wed, = Apr 3, 2024 at 6:56=E2=80=AFAM Bruce Horrocks <ntg@scorecrow.com> wrote:


> On 30 Mar 2024, at 19:59, Alan Bowen <bowenalan03@gmail.com> wrote:
>
> How can I get the last page number of a chapter for a list (ToC)?
>
> Outside of a list, I use \lastpagenumber.
> But that does not work in a list such as the ToC.
>
> Any tips or pointers will be gladly received.


I'm not quite sure what you want to do with these numbers: something li= ke printing out a contents page but instead of the start page of a chapter = it shows the last page of the chapter?

If so then try creating a custom list and use \writetolist immediately befo= re each \stopchapter command?

\definelist[LastPages][criterium=3Dall]
\starttext
\completecontent
\page
\completelist[LastPages]
\page
\dorecurse{10}{
=C2=A0 \startchapter[title=3D{This is my chapter}]
=C2=A0 This is a chapter\par \dorecurse{6}{\input knuth } \input math-konti= nuitet-sv

=C2=A0 \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}=
=C2=A0 \stopchapter
}
\stoptext

But I can't get the number option of \writetolist to work - the "3= ." above is ignored. :-(

=E2=80=94
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-cont= ext@ntg.nl / https://mailman.ntg.nl/mail= man3/lists/ntg-context.ntg.nl
webpage=C2=A0 : https://www.pragma-ade.nl / https://context.aanhet.net= (mirror)
archive=C2=A0 : https://github.com/contextgarden/context=
wiki=C2=A0 =C2=A0 =C2=A0: https://wiki.contextgarden.net
___________________________________________________________________________= ________
--0000000000000da520061532b5ed-- --===============5589160535727824527== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============5589160535727824527==--