From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85264 Path: news.gmane.org!not-for-mail From: "honyk" Newsgroups: gmane.comp.tex.context Subject: Re: Index - ranges Date: Fri, 15 Nov 2013 18:32:52 +0100 Message-ID: <30066.9821248905$1384536794@news.gmane.org> References: <007801cedc04$43767660$ca636320$@tosovsky@email.cz> <00d401cedfec$3eb0c090$bc1241b0$@tosovsky@email.cz> <008c01cee201$4a65bff0$df313fd0$@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 1384536784 476 80.91.229.3 (15 Nov 2013 17:33:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Nov 2013 17:33:04 +0000 (UTC) To: "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 15 18:33:09 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 1VhNGW-0002R9-WE for gctc-ntg-context-518@m.gmane.org; Fri, 15 Nov 2013 18:33:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E1531022A; Fri, 15 Nov 2013 18:33:08 +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 uuLw2HdSYQqB; Fri, 15 Nov 2013 18:33:03 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 07DE4101FB; Fri, 15 Nov 2013 18:33:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DD9B4101FB for ; Fri, 15 Nov 2013 18:33:01 +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 iDN4Q0ERj8qj for ; Fri, 15 Nov 2013 18:33:00 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id CBD8F101DE for ; Fri, 15 Nov 2013 18:33:00 +0100 (CET) Original-Received: from fep21.mx.upcmail.net (fep21.mx.upcmail.net [62.179.121.41]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAFHWrcv017545 for ; Fri, 15 Nov 2013 18:32:59 +0100 Original-Received: from edge02.upcmail.net ([192.168.13.237]) by viefep21-int.chello.at (InterMail vM.8.01.05.13 201-2260-151-135-20130320) with ESMTP id <20131115173251.KJZ28758.viefep21-int.chello.at@edge02.upcmail.net> for ; Fri, 15 Nov 2013 18:32:51 +0100 Original-Received: from emk ([78.102.140.101]) by edge02.upcmail.net with edge id ptYr1m00Y2BTW0m02tYrri; Fri, 15 Nov 2013 18:32:51 +0100 X-SourceIP: 78.102.140.101 In-Reply-To: <008c01cee201$4a65bff0$df313fd0$@tosovsky@email.cz> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac7cBEDUlNgan24oS22bDAP2MuYbFwD5LQUAAIVg26AACi2i0A== Content-Language: cs X-Bayes-Prob: 0.0529 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=62.179.121.41; 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: 0RKNRwR1e - 0bba3ce42a64 - 20131115 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:85264 Archived-At: On 2013-11-15 honyk wrote: > 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 finally found it is caused by this logic: if first == last then if first.references.lastrealpage then -- IMHO this could be optional pagerange(first,first,true,prefixspec,pagespec) else pagenumber(first,prefixspec,pagespec) end elseif last.references.lastrealpage then pagerange(first,last,true,prefixspec,pagespec) else pagerange(first,last,false,prefixspec,pagespec) end Even after normalization, if there is a range, it is preserved regardless it spans multiple pages or not. The fix is quite easy. But whether to convert these single page ranges into a single value or not could be optional, or applied according to the compress parameter (both 'yes' and 'all' would collapse the range). 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 ___________________________________________________________________________________