From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114319 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jbf via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: registers, how to ignore quote marks Date: Sun, 30 Jan 2022 11:30:41 +1100 Message-ID: <5600368b-ae9c-c0be-f9d8-f2490ab1b3c1@gmail.com> References: <1ef73a6f-533c-a654-121b-36e1bca3917d@gmail.com> <80cdf4e3-660b-57e9-70d7-e87f329f794b@fiee.net> <37da766a-44e2-9834-f617-a7f9bab1a895@gmail.com> <5e335942-fb47-82e9-3152-c9c19aae32a0@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3764389904592888364==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4856"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: jbf , mailing list for ConTeXt users , Adam Reviczky To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 30 01:31:12 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDy7c-0000zY-Le for gctc-ntg-context-518@m.gmane-mx.org; Sun, 30 Jan 2022 01:31:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7EF1628979E; Sun, 30 Jan 2022 01:30:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Tgd_J2QiRKJ; Sun, 30 Jan 2022 01:30:52 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B9E45289775; Sun, 30 Jan 2022 01:30:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 800DF289775 for ; Sun, 30 Jan 2022 01:30:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rbgF2BRynlYp for ; Sun, 30 Jan 2022 01:30:47 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.176; helo=mail-pf1-f176.google.com; envelope-from=roma83537@gmail.com; receiver= Original-Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 38CD8282AED for ; Sun, 30 Jan 2022 01:30:47 +0100 (CET) Original-Received: by mail-pf1-f176.google.com with SMTP id u130so9570915pfc.2 for ; Sat, 29 Jan 2022 16:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:cc:from:in-reply-to; bh=CmNhsdsZwrWUCgWHX5OdsSRn3vC72uakpBi/UVhnFHM=; b=ePh+43wBZIjnLwD6LyCZlVps2WVdUBlUx94KElIRTii2R33JZXZeFoNOHr/l55PqhX a8R4vtln9g/86hJck50oYmYhGra3zCZiNEgpyZLbsjLv1eSsvgE0QLLVLbiQXyUGa2f+ Lihr9o8dnaIVtZBQJJixfwvMtjLFhULBIX/N3n7KOHnpyguehTnYU6MYE1AbdwgJjf3V gr8AhD3N6ceQMIqOkSGoeTYZ7Jwxx5GgmU4WlyzLv5xBV+Ybnkrswfln9VLh/hHX/fpP V4YXJCbWmG44LV8mXLKlivxHUBb7qCjkl6nxyAegjosjNa0/St/Vlk94y6vhkOVWN+qW z/Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:cc:from:in-reply-to; bh=CmNhsdsZwrWUCgWHX5OdsSRn3vC72uakpBi/UVhnFHM=; b=pKvBx+3QlWXm2K5fsqHabCgOlv6NWmaxFoo9ABUdE71Kq2AovHFU+H+vuROxRrVv/+ Vt5lYA7el4MOLYCoBCpZtRhksPdIX2thDxIKuPW16x116bCwChwXQFegpfSs+0L/OigL sW+v3vNDWjSWZKbShz5gEatuJ0y+EKxQMn/VKLUVAbprWV32C/EXuUnTBzOdIP+H5iR4 qGUYMKuMnJ8YJD1AJTwnOj7EkWnSbYXifqTpjxaV6bTvw46JT4BfgW919GTlK5xxVBSy 1NvIc54lplICiVYqkVDfuyt6ycU6YGzYp2Ckyu8XJZMixVkZRhl88GasP/inLQOaSPaq nhCw== X-Gm-Message-State: AOAM530iyIbcJiHMlR0p+HWhViFzduTWcpExG8OMNQEFUCHYZY8tT6wz 0Svi/UPLcEl1WsXV5hLuFqE= X-Google-Smtp-Source: ABdhPJyNEdoPOvtKsO8xehkfQRwnxyfUXSgSDbmQTyJDUxLBQUbLsVJVF1IeA95ra/Lb0Qq0++suQw== X-Received: by 2002:a63:4852:: with SMTP id x18mr11805367pgk.286.1643502645644; Sat, 29 Jan 2022 16:30:45 -0800 (PST) Original-Received: from [192.168.0.101] ([120.21.109.121]) by smtp.gmail.com with ESMTPSA id oa10sm6638700pjb.27.2022.01.29.16.30.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Jan 2022 16:30:45 -0800 (PST) Content-Language: en-US In-Reply-To: <5e335942-fb47-82e9-3152-c9c19aae32a0@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:114319 Archived-At: This is a multi-part message in MIME format. --===============3764389904592888364== Content-Type: multipart/alternative; boundary="------------yDnvEuv0Ua5bOUngIqYmLf3C" Content-Language: en-US This is a multi-part message in MIME format. --------------yDnvEuv0Ua5bOUngIqYmLf3C Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit The several responses to my floundering with the register have been very helpful, though I would have to confess that I have ended up 'messing with' things (suggested by Hans re the [key]) and getting a satisfactory result in almost every case without always understanding why. But I can say that I have the 'sorting' issue resolved if it is a main entry, including if that entry is surrounded by quote marks or has one part of that entry formatted differently (e.g. italics). But I don't seem able to apply this to subentries! I cannot solve the sorting of subentries that have special features (e.g. I might have needed italics for part of a subentry, or the subentry is surrounded by quote marks). Here are my two situations (and in each case they appear out of alphabetical order in the subentry list): 1. \index{animals+‘special kinds’}: in this case ‘special kinds’ appears in the subentry list at the bottom of the list, after one that starts with 'v'. I 'messed with' this by adding keys, e.g., \index[Animals] etc. but  the item disappeared from the index altogether. 2. \index{Plenary Council+{\it periti} (experts)}: in this case it is the italicised /periti/ that appears out of place, after the letter 'i' rather than after 'p'. Again I tried putting various keys but this did not help. I guess my confusion is this: I assumed that the [key] establishes the literal string which determines sort order. That seems to be the case for a main entry. How do I get it to work for a subentry? Julian On 29/1/22 21:39, Hans Hagen wrote: > On 1/29/2022 11:02 AM, jbf via ntg-context wrote: >> Thanks for this response. I'll have to work on this (but tomorrow... >> it's late at night for me at the moment). I can see part of what you >> mean: I can use, for example \index[myindex]{\it Book title} (Book >> Author) and get the correct result, but not sorted properly, so I >> have to understand how, as you say, to 'set the sort entry to the >> unformatted version' which is not clear to me at the moment. I'll >> tackle it on the morrow when I'm thinking more clearly! > there is key and entry with key between [] > > when sorting, the key wins but because there can be duplicates the > entry itself is also part of the final sort key > > the accumulates sort key is sanitized and after that sorting happens > in several stages (these can be defined / adapted) according to > language, taking numbers into account and finally using the unicode > ordering ... > > you can fool the system by messing with the [key] > > it's not the easiest subsystem (but it has a long history ... as with > many subsystems the principles are not much different than mkii and > the code seldom changes but of course evolved) > > Hans > > > ----------------------------------------------------------------- >                                           Hans Hagen | PRAGMA ADE >               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- --------------yDnvEuv0Ua5bOUngIqYmLf3C Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

The several responses to my floundering with the register have been very helpful, though I would have to confess that I have ended up 'messing with' things (suggested by Hans re the [key]) and getting a satisfactory result in almost every case without always understanding why. But I can say that I have the 'sorting' issue resolved if it is a main entry, including if that entry is surrounded by quote marks or has one part of that entry formatted differently (e.g. italics).

But I don't seem able to apply this to subentries! I cannot solve the sorting of subentries that have special features (e.g. I might have needed italics for part of a subentry, or the subentry is surrounded by quote marks).

Here are my two situations (and in each case they appear out of alphabetical order in the subentry list):

1. \index{animals+‘special kinds’}: in this case ‘special kinds’ appears in the subentry list at the bottom of the list, after one that starts with 'v'. I 'messed with' this by adding keys, e.g., \index[Animals] etc. but  the item disappeared from the index altogether.

2. \index{Plenary Council+{\it periti} (experts)}: in this case it is the italicised periti that appears out of place, after the letter 'i' rather than after 'p'. Again I tried putting various keys but this did not help.

I guess my confusion is this: I assumed that the [key] establishes the literal string which determines sort order. That seems to be the case for a main entry. How do I get it to work for a subentry?

Julian

On 29/1/22 21:39, Hans Hagen wrote:
On 1/29/2022 11:02 AM, jbf via ntg-context wrote:
Thanks for this response. I'll have to work on this (but tomorrow... it's late at night for me at the moment). I can see part of what you mean: I can use, for example \index[myindex]{\it Book title} (Book Author) and get the correct result, but not sorted properly, so I have to understand how, as you say, to 'set the sort entry to the unformatted version' which is not clear to me at the moment. I'll tackle it on the morrow when I'm thinking more clearly!
there is key and entry with key between []

when sorting, the key wins but because there can be duplicates the entry itself is also part of the final sort key

the accumulates sort key is sanitized and after that sorting happens in several stages (these can be defined / adapted) according to language, taking numbers into account and finally using the unicode ordering ...

you can fool the system by messing with the [key]

it's not the easiest subsystem (but it has a long history ... as with many subsystems the principles are not much different than mkii and the code seldom changes but of course evolved)

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
--------------yDnvEuv0Ua5bOUngIqYmLf3C-- --===============3764389904592888364== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3764389904592888364==--