From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85256 Path: news.gmane.org!not-for-mail From: "honyk" Newsgroups: gmane.comp.tex.context Subject: Re: Index - ranges Date: Fri, 15 Nov 2013 13:50:37 +0100 Message-ID: <47105.2438057542$1384519861@news.gmane.org> References: <007801cedc04$43767660$ca636320$@tosovsky@email.cz> <00d401cedfec$3eb0c090$bc1241b0$@tosovsky@email.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1384519850 16346 80.91.229.3 (15 Nov 2013 12:50:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Nov 2013 12:50:50 +0000 (UTC) To: "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 15 13:50:54 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 1VhIrO-0003dH-1C for gctc-ntg-context-518@m.gmane.org; Fri, 15 Nov 2013 13:50:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4599F10201; Fri, 15 Nov 2013 13:50:53 +0100 (CET) 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 A16g3eFfhkT0; Fri, 15 Nov 2013 13:50:47 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8687F101F0; Fri, 15 Nov 2013 13:50:47 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 617D1101F0 for ; Fri, 15 Nov 2013 13:50:46 +0100 (CET) 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 bSUYQizFg6dj for ; Fri, 15 Nov 2013 13:50:41 +0100 (CET) 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 8FDA2101DE for ; Fri, 15 Nov 2013 13:50:41 +0100 (CET) Original-Received: from fep18.mx.upcmail.net (fep18.mx.upcmail.net [62.179.121.38]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAFCoetZ030559 for ; Fri, 15 Nov 2013 13:50:40 +0100 Original-Received: from edge01.upcmail.net ([192.168.13.236]) by viefep18-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20131115125039.RJW29458.viefep18-int.chello.at@edge01.upcmail.net> for ; Fri, 15 Nov 2013 13:50:39 +0100 Original-Received: from emk ([78.102.140.101]) by edge01.upcmail.net with edge id poqc1m00m2BTW0m01oqc9Q; Fri, 15 Nov 2013 13:50:39 +0100 X-SourceIP: 78.102.140.101 In-Reply-To: <00d401cedfec$3eb0c090$bc1241b0$@tosovsky@email.cz> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac7cBEDUlNgan24oS22bDAP2MuYbFwD5LQUAAIVg26A= Content-Language: cs X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=62.179.121.38; country=AT; latitude=47.3333; longitude=13.3333; http://maps.google.com/maps?q=47.3333,13.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07KNMOE8q - 2f10ec0b7e21 - 20131115 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:85256 Archived-At: On 2013-11-12 honyk wrote: > On 2013-11-07 honyk wrote: > > > > 1) when a range for my subject index entry is specified and the text > > between doesn't overflow to the next page, even in this case > > the range of pages 1-1 is created. Is there any option to normalize > > it to a single page number? > > > > \startregister[index][range_01]{primary} > > Dummy text. > > \stopregister[index][range_01] > > > I've found a promising option compress=no|yes|all in an experimental > test case located in the strc-reg.mkiv file. The corresponding lua > code seems to be performing some cleanup of page ranges, but when > I define it same way, there is no difference in my output (still 1-1). Looking into the lua code this one is an edge case as normalization is performed if #pages > 1 which is not achieved here. No problem. But I've encountered more serious issue now: When original pages are 'compressed' for the index 114, 117, 119, 122, 130-132, 135, 135-139, 188-204, 321-321 The incorrect result is returned: 114, 117, 119, 122, 130-135, 135-321 I'd expect: 114, 117, 119, 122, 130-132, 135-139, 188-204, 321 Debugging it roughly I've noticed unsorted page numbers before compressing (in collapsedpage function in strc-reg.lua), which leads to unexpected result from first/second comparison. Some kind of page entries sorting might help here. Regards, Jan ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________