ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: registers, how to ignore quote marks
@ 2022-01-29  5:23 jbf via ntg-context
  2022-01-29  9:43 ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: jbf via ntg-context @ 2022-01-29  5:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: jbf

Well done Adam - or should I say well read in the Wiki! For all my 
reading of it I still hadn't cottoned on to that. There are several of 
these cases, but I have been able to fix them all now. Thank you.

Any thoughts (but I'm pretty sure this isn't fully explained in the 
wiki) how I can get part of the index entry in italics and part normal? 
That might be a bit more difficult I think.

Julian
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-29  5:23 registers, how to ignore quote marks jbf via ntg-context
@ 2022-01-29  9:43 ` Henning Hraban Ramm via ntg-context
  2022-01-29 10:02   ` jbf via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-01-29  9:43 UTC (permalink / raw)
  To: jbf via ntg-context; +Cc: Henning Hraban Ramm


Am 29.01.22 um 06:23 schrieb jbf via ntg-context:
> Any thoughts (but I'm pretty sure this isn't fully explained in the 
> wiki) how I can get part of the index entry in italics and part 
> normal? That might be a bit more difficult I think.

If you want to format the page number or the whole entry, you can use 
processors. But if you want to format only parts of the entry, I don’t 
see an other solution than to use formatting in the entry and set the 
sort entry to the unformatted version like:

\index[myindexentry]{{\it my} index entry}

otherwise the name of the used commands/macros is used for the index 
ordering.

Hraban

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-29  9:43 ` Henning Hraban Ramm via ntg-context
@ 2022-01-29 10:02   ` jbf via ntg-context
  2022-01-29 10:39     ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: jbf via ntg-context @ 2022-01-29 10:02 UTC (permalink / raw)
  To: Henning Hraban Ramm via ntg-context; +Cc: jbf, mailing list for ConTeXt users

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!

Julian


On 29/1/22 20:43, Henning Hraban Ramm via ntg-context wrote:
>
> Am 29.01.22 um 06:23 schrieb jbf via ntg-context:
>> Any thoughts (but I'm pretty sure this isn't fully explained in the 
>> wiki) how I can get part of the index entry in italics and part 
>> normal? That might be a bit more difficult I think.
>
> If you want to format the page number or the whole entry, you can use 
> processors. But if you want to format only parts of the entry, I don’t 
> see an other solution than to use formatting in the entry and set the 
> sort entry to the unformatted version like:
>
> \index[myindexentry]{{\it my} index entry}
>
> otherwise the name of the used commands/macros is used for the index 
> ordering.
>
> Hraban
>
> ___________________________________________________________________________________ 
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________ 
>
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-29 10:02   ` jbf via ntg-context
@ 2022-01-29 10:39     ` Hans Hagen via ntg-context
  2022-01-30  0:30       ` jbf via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen via ntg-context @ 2022-01-29 10:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-29 10:39     ` Hans Hagen via ntg-context
@ 2022-01-30  0:30       ` jbf via ntg-context
  2022-01-30  9:59         ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: jbf via ntg-context @ 2022-01-30  0:30 UTC (permalink / raw)
  To: Hans Hagen; +Cc: jbf, mailing list for ConTeXt users, Adam Reviczky


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

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

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-30  0:30       ` jbf via ntg-context
@ 2022-01-30  9:59         ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen via ntg-context @ 2022-01-30  9:59 UTC (permalink / raw)
  To: jbf; +Cc: Hans Hagen, mailing list for ConTeXt users, Adam Reviczky

On 1/30/2022 1:30 AM, jbf wrote:
> 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?
just provide an extra key:

key+subkey

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
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
@ 2022-01-30 20:55 jbf via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: jbf via ntg-context @ 2022-01-30 20:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: jbf


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

No, I had already tried that. It places the subentry at the top of the 
list of subentries, not in its correct alphabetical order. Using the 
example below, I assume you meant (I am including text before and after):

The \index[Plenary+periti]{Plenary Council+{\it periti} (experts)} group 
comprises 10 members.

There are nine subentries altogether, and quite a number under 'p', like 
\index{Plenary Council+preparations for}. The italicised /periti /should 
come just before the latter (preparations for) but, using the double key 
above it comes first in the list. The same happens with the subentry 
surrounded by single quotes. It too comes first in the list if I use a 
double key. So clearly it is the fact that there is formatting ({\it 
something}) or quotes ({‘word’}) in a subentry that causes the problem, 
and I am wondering how to overcome this.

Julian

On 30/1/22 20:59, Hans Hagen wrote:
>> 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?
> just provide an extra key: 

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: registers, how to ignore quote marks
  2022-01-29  2:40 jbf via ntg-context
@ 2022-01-29  4:49 ` Adam Reviczky via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: Adam Reviczky via ntg-context @ 2022-01-29  4:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Adam Reviczky


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

Hi Julian,

Have you tried \index[Innovative]{‘Innovative’}?

See wiki entry: https://wiki.contextgarden.net/Registers
- To sort a word (such as "ConTeXt" under "C"), use: \index
<https://wiki.contextgarden.net/Command/index>[CONTEXT]{\ConTeXt}

You would have to change each index call though.

Adam

On Sat, Jan 29, 2022 at 2:42 AM jbf via ntg-context <ntg-context@ntg.nl>
wrote:

> I have an issue that has been raised at least twice in this list but as
> far as I can see it has not received an answer. Perhaps someone can help
> with the following?
>
> I have an index entry that has unicode quote marks either side:
> ‘Innovative Beings’.  I need to retain those quote marks. If I put
> \index{‘Innovative’} then ‘Innovative’ is sorted under ‘ instead of under
> the letter I. How do I get my indexing to ignore the quote marks, at the
> very least the initial one?
>
> My index setup at the moment is as follows:
>
> \defineregister[index][compress=yes]
>
> \setupregister[index][n=1]
>
> \defineprocessor[special][style=italic]
>
> The only hint I could gain from the wiki was that it might depend on using
> a method key in \setupregister, but I could not see which to use. Tried a
> few and got weird results.
>
> Julian
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* registers, how to ignore quote marks
@ 2022-01-29  2:40 jbf via ntg-context
  2022-01-29  4:49 ` Adam Reviczky via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: jbf via ntg-context @ 2022-01-29  2:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: jbf


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

I have an issue that has been raised at least twice in this list but as 
far as I can see it has not received an answer. Perhaps someone can help 
with the following?

I have an index entry that has unicode quote marks either side: 
‘Innovative Beings’.  I need to retain those quote marks. If I put 
\index{‘Innovative’} then ‘Innovative’ is sorted under ‘ instead of 
under the letter I. How do I get my indexing to ignore the quote marks, 
at the very least the initial one?

My index setup at the moment is as follows:

\defineregister[index][compress=yes]

\setupregister[index][n=1]

\defineprocessor[special][style=italic]

The only hint I could gain from the wiki was that it might depend on 
using a method key in \setupregister, but I could not see which to use. 
Tried a few and got weird results.

Julian

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-30 20:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29  5:23 registers, how to ignore quote marks jbf via ntg-context
2022-01-29  9:43 ` Henning Hraban Ramm via ntg-context
2022-01-29 10:02   ` jbf via ntg-context
2022-01-29 10:39     ` Hans Hagen via ntg-context
2022-01-30  0:30       ` jbf via ntg-context
2022-01-30  9:59         ` Hans Hagen via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2022-01-30 20:55 jbf via ntg-context
2022-01-29  2:40 jbf via ntg-context
2022-01-29  4:49 ` Adam Reviczky via ntg-context

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).