From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92335 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: \defineprocessor and \at Date: Tue, 11 Aug 2015 18:29:00 -0400 Message-ID: <55CA772C.2090709@rik.users.panix.com> References: <55BFE8D3.7070507@rik.users.panix.com> <55CA43BB.4090409@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1548055630==" X-Trace: ger.gmane.org 1439332207 4404 80.91.229.3 (11 Aug 2015 22:30:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2015 22:30:07 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 12 00:29:55 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 1ZPI3O-00014A-G2 for gctc-ntg-context-518@m.gmane.org; Wed, 12 Aug 2015 00:29:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ADEF61022E for ; Wed, 12 Aug 2015 00:29: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 DYjLchY21QeA for ; Wed, 12 Aug 2015 00:29:52 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id CCA3910232 for ; Wed, 12 Aug 2015 00:29:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 72C3A101F9 for ; Wed, 12 Aug 2015 00:29:21 +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 WvdCvopjdOWw for ; Wed, 12 Aug 2015 00:29:08 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 75EF8101E6 for ; Wed, 12 Aug 2015 00:29:08 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter2-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7BMT6nF015371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Aug 2015 00:29:07 +0200 Original-Received: from [192.168.9.13] (pool-71-183-246-38.nycmny.fios.verizon.net [71.183.246.38]) by mailbackend.panix.com (Postfix) with ESMTPSA id 412B71651B for ; Tue, 11 Aug 2015 18:29:05 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <55CA43BB.4090409@gmail.com> 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: 0QP3yt6oN - 8c573aafc6d9 - 20150812 (trained as not-spam) Received-SPF: pass (filter2-ams.mf.surf.net: domain of context@rik.users.panix.com designates 166.84.1.89 as permitted sender) receiver=filter2-ams.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 192.87.102.70 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:92335 Archived-At: This is a multi-part message in MIME format. --===============1548055630== Content-Type: multipart/alternative; boundary="------------090109000005060102060500" This is a multi-part message in MIME format. --------------090109000005060102060500 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2015-08-11 14:49, Wolfgang Schuster wrote: >> Rik Kabel >> 4. August 2015 00:18 >> Should processors work with references? I would think that they >> should, but the following fails. (My backmatter page numbers need to >> be marked to distinguish them from bodymatter pages. I can automate >> applying a processor based on the location for index register >> entries, but not for references.) > \defineprocessor [bodypart] [style=bold] > \defineprocessor [backpart] [style=italic] > > \defineconversionset[bodypart:pagenumber][][bodypart->n] > \defineconversionset[backpart:pagenumber][][backpart->n] > > \setupheadertexts[{\convertedcounter[userpage][numberconversionset=number]}] > > \starttext > > \startbodymatter > > \chapter[sec:knuth]{Knuth} > > \at{page}[sec:knuth]\par > \at{page}[sec:zapf] > > \stopbodymatter > > \startbackmatter > > \chapter[sec:zapf]{Zapf} > > \at{page}[sec:knuth]\par > \at{page}[sec:zapf] > > \stopbackmatter > > \stoptext > > Wolfgang > Wolfgang, This is clearly a superior solution to my index-only attempt, handling all references to backmatter pages without regard to their being in the index or in text references. However, the page number adjustment via \setupheadertexts is handled only at the top center (default location) of each page. Can you suggest how to modify this to support an un-processed page number in the right margin of the footer of backmatter pages? I currently use: \setupheadertexts[][chapter][part][] \setuppagenumbering [alternative=doublesided,location={footer,margin}] and I do not see where {\convertedcounter[userpage][numberconversionset=number]} or something else to restore un-processed numbers might work, despite trying with \setupfootertexts, \setuppagenumbering, \setuppagenumbering, and related commands. -- Rik --------------090109000005060102060500 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 2015-08-11 14:49, Wolfgang Schuster wrote:
4. August 2015 00:18
Should processors work with references? I would think that they should, but the following fails. (My backmatter page numbers need to be marked to distinguish them from bodymatter pages. I can automate applying a processor based on the location for index register entries, but not for references.)
\defineprocessor [bodypart] [style=bold]
\defineprocessor [backpart] [style=italic]

\defineconversionset[bodypart:pagenumber][][bodypart->n]
\defineconversionset[backpart:pagenumber][][backpart->n]

\setupheadertexts[{\convertedcounter[userpage][numberconversionset=number]}]

\starttext

\startbodymatter

\chapter[sec:knuth]{Knuth}

\at{page}[sec:knuth]\par
\at{page}[sec:zapf]

\stopbodymatter

\startbackmatter

\chapter[sec:zapf]{Zapf}

\at{page}[sec:knuth]\par
\at{page}[sec:zapf]

\stopbackmatter

\stoptext

Wolfgang

Wolfgang,

This is clearly a superior solution to my index-only attempt, handling all references to backmatter pages without regard to their being in the index or in text references.

However, the page number adjustment via \setupheadertexts is handled only at the top center (default location) of each page. Can you suggest how to modify this to support an un-processed page number in the right margin of the footer of backmatter pages? I currently use:
\setupheadertexts[][chapter][part][]
\setuppagenumbering [alternative=doublesided,location={footer,margin}]
and I do not see where {\convertedcounter[userpage][numberconversionset=number]} or something else to restore un-processed numbers might work, despite trying with \setupfootertexts, \setuppagenumbering, \setuppagenumbering, and related commands.

--
Rik

--------------090109000005060102060500-- --===============1548055630== 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= --===============1548055630==--