ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan Bowen <bowenalan03@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: indexing puzzle
Date: Thu, 24 May 2012 07:06:57 -0400	[thread overview]
Message-ID: <CAFMOkGWH9rnR8vMMu+g=mSSaUFBbaFa+1GN03=E-TFdLNFfi8g@mail.gmail.com> (raw)
In-Reply-To: <CAFMOkGUJDVFmfg_1hHUid1jjOBF8GST2D4JiBDFXq+cknt=04A@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2091 bytes --]

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–9,
[AuthorText02] for pages 10–99, and so on

The next is to insert the command “ \ab” (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=\hbox{\tfx\char32}
\digitwidth=\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 <bowenalan03@gmail.com> 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 “1253.7”
> rather than as “1253.07” or “1253. 7”
>
> I have experimented with different sort keys—e.g., AuthorText125307—and
> 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 of
> order (485.19, 485.21 before 477.31, and so on). Very puzzling. (Restoring
> 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
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 2845 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2012-05-24 11:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 22:39 Alan Bowen
2012-05-24 11:06 ` Alan Bowen [this message]
2012-05-24 21:14   ` Rogers, Michael K
2012-05-26 12:41     ` Alan Bowen
2012-05-26 13:21       ` Rogers, Michael K
2012-05-26 14:12         ` Alan Bowen
2012-05-26 14:54           ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFMOkGWH9rnR8vMMu+g=mSSaUFBbaFa+1GN03=E-TFdLNFfi8g@mail.gmail.com' \
    --to=bowenalan03@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).