From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92138 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Solved, was Re: Register customization for backmatter page numbers Date: Sat, 1 Aug 2015 14:42:47 -0400 Message-ID: <55BD1327.4030207@rik.users.panix.com> References: <55BC2CFE.9020200@panix.com> <55BD07DD.8020303@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0032086333==" X-Trace: ger.gmane.org 1438454621 27700 80.91.229.3 (1 Aug 2015 18:43:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 18:43:41 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 01 20:43:29 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZLbkl-0003qX-T0 for gctc-ntg-context-518@m.gmane.org; Sat, 01 Aug 2015 20:43:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 448C710206 for ; Sat, 1 Aug 2015 20:43:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rPb7Sql8P3Y0 for ; Sat, 1 Aug 2015 20:43:26 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D552010242 for ; Sat, 1 Aug 2015 20:42:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 46B9810208 for ; Sat, 1 Aug 2015 20:42:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hs_CyMO6OVcU for ; Sat, 1 Aug 2015 20:42:52 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 3A9DD10206 for ; Sat, 1 Aug 2015 20:42:52 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t71IgnqO009948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 1 Aug 2015 20:42:50 +0200 Original-Received: from [192.168.201.10] (cpe-74-76-74-238.nycap.res.rr.com [74.76.74.238]) by mailbackend.panix.com (Postfix) with ESMTPSA id 9559917725 for ; Sat, 1 Aug 2015 14:42:48 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <55BD07DD.8020303@gmx.es> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=New York; latitude=40.7553; longitude=-73.9924; http://maps.google.com/maps?q=40.7553,-73.9924&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04OXuGOOg - 780c375e2cb1 - 20150801 (trained as not-spam) Received-SPF: pass (filter2-utr.mf.surf.net: domain of context@rik.users.panix.com designates 166.84.1.89 as permitted sender) receiver=filter2-utr.mf.surf.net; client-ip=166.84.1.89; envelope-from=; helo=mailbackend.panix.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:92138 Archived-At: This is a multi-part message in MIME format. --===============0032086333== Content-Type: multipart/alternative; boundary="------------090309070002010100030109" This is a multi-part message in MIME format. --------------090309070002010100030109 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-08-01 13:54, Pablo Rodriguez wrote: > Hi Rik, > > sorry for top-posting, but I=E2=80=99m not sure whether I understand yo= ur request. > > I wonder whether the following sample points in the right direction: > > \setuppapersize[A6] > \setuppagenumber[way=3Dbypart, prefix=3Dyes, prefixset=3Dchapter] > \startsectionblockenvironment[bodypart] > \setuppagenumber[number=3D1] > \stopsectionblockenvironment > \startsectionblockenvironment[appendix] > \setuppagenumber[number=3D1] > \stopsectionblockenvironment > \starttext > \completecontent > \startbodymatter > \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}} > \stopbodymatter > \startappendices > \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}} > \title{Index} > \placeindex > \stopappendices > \stoptext > > Just in case it helps, > > Pablo > > > On 08/01/2015 04:20 AM, Rik wrote: >> List, >> >> I have a book with frontmatter, bodymatter, and backmatter. The >> frontmatter is pagenumbered with lc roman, and the bodymatter and >> backmatter are numbered, all by block. >> >> The backmatter contain a glossary, pagenotes, bibliography, and an >> index. In addition to the frontmatter and the bodymatter, both the >> glossary and the pagenotes contain items that are indexed. >> >> I need to distinguish pagenumbers that appear in the index so that the >> reader can identify where in the book the page is located. For the >> frontmatter, that is not a problem. For items that appear in the >> bodymatter or backmatter, however, page numbers are not unique. >> >> One method that has been suggested is to prefix the pagenumber display= ed >> in the index with a mark to indicate that the page is in the backmatte= r, >> or to italicize it, or to use an alternate font. I have looked at the >> defineconversionset and defineprocessor documentation and find no way = to >> mark index entries appropriately. >> >> Can anyone suggest a way to do this, or some other method? Perhaps a >> pagecommand that compares the register item real page number to the >> highest real page number of the body? I would prefer a solution that >> does not require changing the register commands (\index) in the text. >> >> Continuous numbering across the frontmatter, bodymatter, and backmatte= r >> is not wanted, although as a last resort I might be able to argue for >> continuous numbering in the bodymatter and backmatter. Thank you, Pablo. That does meet the requirements as stated, but having=20 the chapter number as a prefix for the body entries is overly verbose=20 and will not pass muster. (Failure of my specifications.) I have found a solution, however. By placing these in the environment: \defineprocessor[Back][style=3Dslanted,right=3Dn] \defineprocessor[Front][style=3Dnormal] \def\Where{Front} \def\Index{\index[\Where->]} And this at the start of the backmatter: \def\Where{Back} I can index items with \Index{item} and the value of \Where when the=20 entry is processed will be used. This meets the requirement that no=20 change to the indexing is required in the text (except to change \index=20 to \Index), and I can further distinguish notes from glossary entries if=20 needed. I could even eliminate that last change by defining my own=20 register Index and using \def\index{\Index[\Where->] (and an appropriate=20 \placeregister). I still haven't played with this a lot, so I don't know yet if it will=20 handle all the optional bits of register entries, but it should suffice=20 for my current needs. --=20 Rik --------------090309070002010100030109 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On 2015-08-01 13:54, Pablo Rodriguez wrote:
Hi Rik,

sorry for top-posting, but I=E2=80=99m not sure whether I understand your=
 request.

I wonder whether the following sample points in the right direction:

    \setuppapersize[A6]
    \setuppagenumber[way=3Dbypart, prefix=3Dyes, prefixset=3Dchapter]
    \startsectionblockenvironment[bodypart]
        \setuppagenumber[number=3D1]
    \stopsectionblockenvironment
    \startsectionblockenvironment[appendix]
        \setuppagenumber[number=3D1]
    \stopsectionblockenvironment
    \starttext
    \completecontent
    \startbodymatter
    \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}}
    \stopbodymatter
    \startappendices
    \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}}
    \title{Index}
    \placeindex
    \stopappendices
    \stoptext

Just in case it helps,

Pablo


On 08/01/2015 04:20 AM, Rik wrote:
List,

I have a book with frontmatter, bodymatter, and backmatter. The=20
frontmatter is pagenumbered with lc roman, and the bodymatter and=20
backmatter are numbered, all by block.

The backmatter contain a glossary, pagenotes, bibliography, and an=20
index. In addition to the frontmatter and the bodymatter, both the=20
glossary and the pagenotes contain items that are indexed.

I need to distinguish pagenumbers that appear in the index so that the=20
reader can identify where in the book the page is located. For the=20
frontmatter, that is not a problem. For items that appear in the=20
bodymatter or backmatter, however, page numbers are not unique.

One method that has been suggested is to prefix the pagenumber displayed=20
in the index with a mark to indicate that the page is in the backmatter,=20
or to italicize it, or to use an alternate font. I have looked at the=20
defineconversionset and defineprocessor documentation and find no way to=20
mark index entries appropriately.

Can anyone suggest a way to do this, or some other method? Perhaps a=20
pagecommand that compares the register item real page number to the=20
highest real page number of the body? I would prefer a solution that=20
does not require changing the register commands (\index) in the text.

Continuous numbering across the frontmatter, bodymatter, and backmatter=20
is not wanted, although as a last resort I might be able to argue for=20
continuous numbering in the bodymatter and backmatter.
Thank you, Pablo. That does meet the requirements as stated, but having the chapter number as a prefix for the body entries is overly verbose and will not pass muster. (Failure of my specifications.)

I have found a solution, however. By placing these in the environment:
\defineprocessor[Back][style=3Dslanted,right=3Dn]
\defineprocessor[Front][style=3Dnormal]
\def\Where{Front}
\def\Index{\index[\Where->]}
And this at the start of the backmatter:
\def\Where{Back}
I can index items with \Index{item} and the value of \Wh= ere when the entry is processed will be used. This meets the requirement that no change to the indexing is required in the text (except to change \index to \Index), and I can further distinguish notes from glossary entries if needed. I could even eliminate that last change by defining my own register Index and using \def\index{\Index[\Where->] (and an appropriate \placeregister).

I still haven't played with this a lot, so I don't know yet if it will handle all the optional bits of register entries, but it should suffice for my current needs.

--
Rik
--------------090309070002010100030109-- --===============0032086333== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0032086333==--