From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92341 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \defineprocessor and \at Date: Wed, 12 Aug 2015 15:10:44 +0200 Message-ID: <55CB45D4.4010604@gmail.com> References: <55BFE8D3.7070507@rik.users.panix.com> <55CA43BB.4090409@gmail.com> <55CA772C.2090709@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1572207243==" X-Trace: ger.gmane.org 1439385264 16038 80.91.229.3 (12 Aug 2015 13:14:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2015 13:14:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 12 15:14:10 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 1ZPVr3-000157-A9 for gctc-ntg-context-518@m.gmane.org; Wed, 12 Aug 2015 15:14:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 933DE101FE for ; Wed, 12 Aug 2015 15:14:04 +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 vew6vTR0xl0O for ; Wed, 12 Aug 2015 15:14:03 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7F9C710242 for ; Wed, 12 Aug 2015 15:13:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7A25F101E6 for ; Wed, 12 Aug 2015 15:13:24 +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 ELoZfQFaPRFm for ; Wed, 12 Aug 2015 15:13:23 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 1F0F51020F for ; Wed, 12 Aug 2015 15:10:49 +0200 (CEST) Original-Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7CDAlnj016156 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 12 Aug 2015 15:10:48 +0200 Original-Received: by wicne3 with SMTP id ne3so217658975wic.1 for ; Wed, 12 Aug 2015 06:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=CpLOgxO+AS4C7JufNWi1uJZygpO1Zc3eatKW6SVrv/Y=; b=ZHiSwd+Tpm/Lz5lY85cMNn6ew6AXie2JrKfkOhNkWJ4qUaV6ADgXtZa5QBtDPu6FoK HHftpqkX5MMKw2bGhBSsJw0I3LsAcSM7q916EbjbWvSUKTgkugNqTLknxx/aNBf7c8jQ MKsWOa3Pkv5Z4ljHZHKhvc/V3VRYzTltPfjvydw6vw/MHTKXouJ1JJxswE5eNPZ4ZlTd ROhnDw+sV6nm92XiIqst25RvetzI9H6b9OSo4TxtE8add64jCLKAihbbM3kSVVphYcsf GRecHtacQ/pbEXO/Fnh/6msYO1GH04eDvwibX8FY1DyAHkTdMOiaFv2C+JNnf2iUvF3b NNBg== X-Received: by 10.180.90.65 with SMTP id bu1mr48401793wib.0.1439385047384; Wed, 12 Aug 2015 06:10:47 -0700 (PDT) Original-Received: from keima.localdomain (x2f24494.dyn.telefonica.de. [2.242.68.148]) by smtp.googlemail.com with ESMTPSA id gt10sm8301377wib.20.2015.08.12.06.10.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Aug 2015 06:10:46 -0700 (PDT) User-Agent: Postbox 4.0.3 (Macintosh/20150805) In-Reply-To: <55CA772C.2090709@rik.users.panix.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::232; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01P3NaLdB - b312d1622552 - 20150812 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::232 as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2a00:1450:400c:c05::232; envelope-from=; helo=mail-wi0-x232.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:92341 Archived-At: This is a multi-part message in MIME format. --===============1572207243== Content-Type: multipart/alternative; boundary="------------040707030804040905040900" This is a multi-part message in MIME format. --------------040707030804040905040900 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Rik Kabel > 12. August 2015 00:29 > 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. Disable the page number (\setuppagenumbering[location=none]) and use \setupfootertexts to place it. \setupfootertexts[margin][][{\convertedcounter[userpage][numberconversionset=number]}][{\convertedcounter[userpage][numberconversionset=number]}][] \setuppagenumbering [alternative=doublesided,location=none] Wolfgang --------------040707030804040905040900 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
12. August 2015 00:29
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.
Disable the page number (\setuppagenumbering[location=none]) and use \setupfootertexts to place it.

\setupfootertexts[margin][][{\convertedcounter[userpage][numberconversionset=number]}][{\convertedcounter[userpage][numberconversionset=number]}][]
\setuppagenumbering [alternative=doublesided,location=none]

Wolfgang
--------------040707030804040905040900-- --===============1572207243== 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= --===============1572207243==--