From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92334 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 16:03:51 -0400 Message-ID: <55CA5527.3040104@rik.users.panix.com> References: <55BFE8D3.7070507@rik.users.panix.com> <55CA43BB.4090409@gmail.com> <55CA4FEF.7050005@rik.users.panix.com> <55CA5175.40506@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1965851075==" X-Trace: ger.gmane.org 1439323488 13454 80.91.229.3 (11 Aug 2015 20:04:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2015 20:04:48 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 11 22:04:33 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 1ZPFmj-0007Lp-7S for gctc-ntg-context-518@m.gmane.org; Tue, 11 Aug 2015 22:04:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69A3F10232 for ; Tue, 11 Aug 2015 22:04:32 +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 rFtqHxTcfvJX for ; Tue, 11 Aug 2015 22:04:31 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 96C6D10234 for ; Tue, 11 Aug 2015 22:04:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4677E101F9 for ; Tue, 11 Aug 2015 22:04:00 +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 fhMVI2vSY4FC for ; Tue, 11 Aug 2015 22:03:59 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 8768F101E6 for ; Tue, 11 Aug 2015 22:03:59 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t7BK3vGY011727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 11 Aug 2015 22:03:58 +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 C1A8E17DC4 for ; Tue, 11 Aug 2015 16:03:56 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <55CA5175.40506@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: 07P3w3WLe - 0d7cd13ec7e2 - 20150811 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of context@rik.users.panix.com designates 166.84.1.89 as permitted sender) receiver=filter1-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) 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:92334 Archived-At: This is a multi-part message in MIME format. --===============1965851075== Content-Type: multipart/alternative; boundary="------------090902070708030605070106" This is a multi-part message in MIME format. --------------090902070708030605070106 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2015-08-11 15:48, Wolfgang Schuster wrote: >> Rik Kabel >> 11. August 2015 21:41 >> On 2015-08-11 14:49, Wolfgang Schuster wrote: >> Thank you, Wolfgang, for that. But it still does not handle the after >> key, as I had in my example, and which works in a processor for index >> entries. Is there no way to do this? > The processor mechanism has no after key and I have no idea what it is > shoudl do. > My apologies, Wolfgang and list. The key I use is right, as in the following snippet from my environment. I should have checked my files instead of relying on memory when I replied. When I add it to your solution it does work. \defineprocessor[Back][ style=slanted, right=n, ] \defineprocessor[notBack][ style=normal, ] \defineregister[Index] \setupregister [Index][n=2, command=\Word, balance=no, compress=yes, ] \starttexdefinition unexpanded index \dosingleempty\dostartindex \stoptexdefinition \starttexdefinition dostartindex [#sortkey] \doifmodeelse{*backpart} {\Index[Back->#sortkey]} {\Index[notBack->#sortkey]} \stoptexdefinition \starttexdefinition unexpanded seeindex \seeIndex \stoptexdefinition \starttexdefinition doIndex #INDEXTERM \expanded{\index{#INDEXTERM}} \stoptexdefinition With this, I can use \index[Macintyre]{McIntyre, John} in the main text or an endnote and the indexing will identify the section. My simple use of the processor did not work, however, for references. -- Rik --------------090902070708030605070106 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On 2015-08-11 15:48, Wolfgang Schuster wrote:
11. August 2015 21:41=
On 2015-08-11 14:49, Wolfgang Schuster wrote:
Thank you, Wolfgang, for that. But it still does not handle the after key, as I had in my example, and which works in a processor for index entries. Is there no way to do this?
The processor mechanism has no after key and I have no idea what it is shoudl do.

My apologies, Wolfgang and list. The key I use is right, as in the following snippet from my environment. I should have checked my files instead of relying on memory when I replied.

When I add it to your solution it does work.
\defineprocessor[Back][
=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=C2=A0=C2=A0= style=3Dslanted,
=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=C2=A0=C2=A0= right=3Dn,
=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=C2=A0 ]
\defineprocessor[notBack][
=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=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 style=3Dnormal,
=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=C2=A0=C2=A0= =C2=A0=C2=A0 ]

\defineregister[Index]
\setupregister [Index][n=3D2,
=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=C2=A0=C2=A0= command=3D\Word,
=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=C2=A0=C2=A0= balance=3Dno,
=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=C2=A0=C2=A0= compress=3Dyes,
=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=C2=A0 ]

\starttexdefinition unexpanded index

=C2=A0 \dosingleempty\dostartindex
\stoptexdefinition
\starttexdefinition dostartindex [#sortkey]
=C2=A0 \doifmodeelse{*backpart}
=C2=A0=C2=A0=C2=A0=C2=A0 {\Index[Back->#sortkey]}<= tt>
=C2=A0=C2=A0=C2=A0=C2=A0 {\Index[notBack->#sortkey]}
\stoptexdefinition
\starttexdefinition unexpanded seeindex
=C2=A0 \seeIndex
\stoptexdefinition


\starttexdefinition doIndex #INDEXTERM
=C2=A0 \expanded{\index{#INDEXTERM}}
\stoptexdefinition
With this, I can use \index[Macintyre]{McIntyre, John} in the main text or an endnote and the indexing will identify the section. My simple use of the processor did not work, however, for references.

--
Rik
--------------090902070708030605070106-- --===============1965851075== 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= --===============1965851075==--