From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84461 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Repeat second-level registers within index Date: Fri, 27 Sep 2013 20:18:16 +0200 Message-ID: <5245CBE8.6050809@wxs.nl> References: <20130926101657.GA10697@phlegethon> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380305904 23881 80.91.229.3 (27 Sep 2013 18:18:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Sep 2013 18:18:24 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 27 20:18:29 2013 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 1VPccV-0000ud-GB for gctc-ntg-context-518@m.gmane.org; Fri, 27 Sep 2013 20:18:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 089BB101DE; Fri, 27 Sep 2013 20:16:15 +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 BUqNyWHvjtRs; Fri, 27 Sep 2013 20:16:12 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 776AD101E6; Fri, 27 Sep 2013 20:16:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 99BBA101E6 for ; Fri, 27 Sep 2013 20:16:10 +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 uJLHzPMh6QWm for ; Fri, 27 Sep 2013 20:16:09 +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 5B909101DE for ; Fri, 27 Sep 2013 20:16:09 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r8RIIJA6022611 for ; Fri, 27 Sep 2013 20:18:20 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.0.4.6; Original-Received: from [10.0.4.6] (unverified [10.0.4.6]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 7681-1713362 for ; Fri, 27 Sep 2013 20:18:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <20130926101657.GA10697@phlegethon> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0069 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07KuiijwT - 6fdc2a4e7e41 - 20130927 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84461 Archived-At: On 9/26/2013 12:16 PM, Philipp Gesang wrote: > =B7=B7=B7=B7=B7=B7=B7=B7=B7 > >> Hi, >> >> How do you prevent ConTeXt from hiding (collapsing?) duplicate level 2 >> index items? >> >> For example: >> >> \startitem >> 5 array \index{hedgehog+SECTION A}hedgehog >> \stopitem >> \startitem >> 7 army \index{herring+SECTION A}herring >> \stopitem >> \startitem >> 100 bloat \index{hippopotamuses+SECTION A}hippopotamuses >> \stopitem >> >> The text "SECTION A" will only appear once in the index, right after >> hedgehog. I would like it to appear once per index term, always. > > Confirmed. The subentries aren=92t shown if: > > - entries that share a subentry (level 2) are indexed > consecutively, and > > - these entries are different but belong in the same register > section (same initial letter) > > Example: > > \starttext > \placeindex > > \page > > \index{a+foo} whatever %% shows up > \index{aa+foo} whatever %% doesn=92t > \index{aaa+foo} whatever %% doesn=92t > \index{aaaa+bar} whatever %% shows up > \index{aaaaa+foo} whatever %% shows up > \index{aaaaaa+foo} whatever %% doesn=92t > > \stoptext > > If you s/bar/foo/ in the fourth invocation of \index, only the > first entry (=93a=94) of the register will have the subentry =93foo=94. > Change the initial letters of each entry and all subentries are > printed. can you run tests with (line 695 in strc-reg): for i=3D1,4 do -- max 4 if list[i] then e[i] =3D list[i][1] end if e[i] ~=3D done[i] then if e[i] and e[i] ~=3D "" then done[i] =3D e[i] for j=3Di+1,4 do done[j] =3D false end if n =3D=3D i then context.stopregisterentries() context.startregisterentries(n) else while n > i do n =3D n - 1 context.stopregisterentries() end while n < i do n =3D n + 1 context.startregisterentries(n) end end local internal =3D entry.references.internal or 0 local seeparent =3D entry.references.seeparent or = "" local processor =3D entry.processors and = entry.processors[1] or "" if metadata then = context.registerentry(processor,internal,seeparent,function() = helpers.title(e[i],metadata) end) else -- ? = context.registerentry(processor,internal,seeindex,e[i]) end else done[i] =3D false for j=3Di,4 do done[j] =3D false end end end end ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________