From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76367 Path: news.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: indexing puzzle Date: Thu, 24 May 2012 07:06:57 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1883114184==" X-Trace: dough.gmane.org 1337857631 9873 80.91.229.3 (24 May 2012 11:07:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 May 2012 11:07:11 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu May 24 13:07:08 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SXVsn-0006YI-61 for gctc-ntg-context-518@m.gmane.org; Thu, 24 May 2012 13:07:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A8E63101E4; Thu, 24 May 2012 13:07:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p999R+qy3giK; Thu, 24 May 2012 13:07:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DABFC101DF; Thu, 24 May 2012 13:07:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A97E2101DF for ; Thu, 24 May 2012 13:07: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 (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VK3z2q7JjyrY for ; Thu, 24 May 2012 13:06:59 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id C6546101DD for ; Thu, 24 May 2012 13:06:59 +0200 (CEST) Original-Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q4OB5arZ007682 for ; Thu, 24 May 2012 13:05:36 +0200 Original-Received: by qcsd16 with SMTP id d16so7769296qcs.14 for ; Thu, 24 May 2012 04:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3bTsSGDLkqpEpHlXXTdNqBtk2qTq34Ks9xgMpin+K6E=; b=OYmXHPgCMjIQqLvx1qN8lTBFP+y8UasT9tFhwv0nPHD0pYB5bxxYsunjkqLtXLNSGK E7SaQWblnYXHTzW7T0PEthGT3zvrTGBQm5t+GjCCl+mKsuPqpbS4eHrrBoQm8JhxUvPo 2uo6k3LAKFvrQz2ApxfTRSqv9ntBFQ9nCjIaIQ4OpUj19s/XA79YO/SvN2alL8ZnMSEA +bWjZU3fDf7l7UYdi9Olu7634+Kp6RmnfK56K1P9iGhj0q6CUJXu0xzD0rv3QPgFb5L5 7UIkKQ/jX8/IBLmzHrBGbEBL1vGYI0ecqAcJm+lOYuRjtnGDWCa/sUvzsOEmPh8F1WOM g8xw== Original-Received: by 10.224.205.8 with SMTP id fo8mr9934078qab.78.1337857617882; Thu, 24 May 2012 04:06:57 -0700 (PDT) Original-Received: by 10.229.14.70 with HTTP; Thu, 24 May 2012 04:06:57 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WHdL5Ar2 - 60c991fe68c7 - 20120524 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:76367 Archived-At: --===============1883114184== Content-Type: multipart/alternative; boundary=20cf3005dc0a12edc804c0c6407b --20cf3005dc0a12edc804c0c6407b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable For anyone interested in producing classical indices locorum, I have devised a way that seems to work, although it is not that elegant. The first step is to modify the sort keys by counting the number of digits in the page number: thus, [AuthorText01] for pages 1=969, [AuthorText02] for pages 10=9699, and so on The next is to insert the command =93 \ab=94 (note the space) when the line number is a single digit: thus 391. \ab{}2 but 391.12 in the entry specification {Author+Text+page.line} For \ab, I have: \newdimen\digitwidth \setbox0=3D\hbox{\tfx\char32} \digitwidth=3D\wd0 \def\ab{\tfx\kern-\digitwidth} The hitch here is that the font size is not context dependent. Alan On Tue, May 22, 2012 at 6:39 PM, Alan Bowen wrote: > I have been trying to index the passages cited in a book and would be > grateful for some tactical advice. > > There are several works by a single author, and it is customary to cite > each text by page and line number, as in 1253.12 (page 1253, line12), for > example. > > I have a sort key for each work. But now I need a way to get the entry > > 1253.7 (page 1253, line 7) before the entry > 1253.12 (page 1253, line 12). > > \[Passage[AuthorText]{Author+Text+1253.07}1253.7 or > \[Passage[AuthorText]{Author+Text+1253.07}1253. 7 > would work, but it is really better to have the index entry as =931253.7= =94 > rather than as =931253.07=94 or =931253. 7=94 > > I have experimented with different sort keys=97e.g., AuthorText125307=97a= nd > can generate an index with the 1235.7 and so on in the proper place and > form, say, before 1253.12. > > But then the problem is that I also get entire sequences of entries out o= f > order (485.19, 485.21 before 477.31, and so on). Very puzzling. (Restorin= g > the sort key AuthorText removes the latter problems but then leaves 1253.= 7 > in the wrong place.) > > If anyone has experience with this or just some ideas for a solution, > their suggestions will be most welcome. > > I am using the MKII in the latest ConTeXt standalone. > > Alan > > > > --20cf3005dc0a12edc804c0c6407b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable For anyone interested in producing classical indices locorum, I have devise= d a way that seems to work, although it is not that elegant.

=
The first step is to modify the sort keys by counting the number of di= gits in the page number:=A0
thus,
[AuthorText01] for pages 1=969,=A0
[AuthorTe= xt02] for pages 10=9699, and so on

The next is to = insert the command =93 \ab=94 (note the space) when the line number is a si= ngle digit:=A0
thus=A0
391. \ab{}2 but 391.12 in the entry specification {A= uthor+Text+page.line}

For \ab, I have:
<= br>
\newdimen\digitwidth
\setbox0=3D\hbox{\tfx\cha= r32}
\digitwidth=3D\wd0

\def\ab{\tfx\kern-\digitwi= dth}

The hitch here is that the font size is= not context dependent.

Alan


--20cf3005dc0a12edc804c0c6407b-- --===============1883114184== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1883114184==--