ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* (again) bug in index sorting?
@ 2014-11-01 16:24 Pablo Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-11-01 16:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

\setuppapersize[A6]
\starttext
\index{tipografía digital}
\index{tipografías}
\index{tomato white}
\index{tomatoes red}
\index{idioma+de un pasaje}
\index{idioma+del documento}
\completeindex
\stoptext

Latest beta from 2014.10.31 12:47 sorts the index entries the following way:

	tomatoes red
	tomato white

Of course, this sample doesn’t make sense, but the entries in Spanish
do. All of them are wrong sorted.

Stable version from 2014.01.03 00:40. The different sorting criterium
seems to have been introduced in beta from 2014.10.22 16:23.

Or shouldn’t be the first word sorted first and then the second one in
index entry?

Could anyone be so kind to confirm the bug?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: (again) bug in index sorting?
  2014-11-03 13:50   ` Alan BRASLAU
@ 2014-11-03 18:11     ` Pablo Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-11-03 18:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/03/2014 02:50 PM, Alan BRASLAU wrote:
> [...]
> When indexing items containing several words, the sorting should go
> word by word, thus
> tipografía digital
> before
> tipografías
> 
> This amounts to making whitespace higher precedence than anything else,
> which I believe was not the case but now is fixed.

This was fixed in beta from yesterday.


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: (again) bug in index sorting?
  2014-11-03 12:22 ` Robert Blackstone
@ 2014-11-03 13:50   ` Alan BRASLAU
  2014-11-03 18:11     ` Pablo Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Alan BRASLAU @ 2014-11-03 13:50 UTC (permalink / raw)
  To: Robert Blackstone; +Cc: ntg-context

On Mon, 3 Nov 2014 13:22:28 +0100
Robert Blackstone <blackstone.robert@gmail.com> wrote:

> 
> On 3 Nov 2014, at 10:01 , Alan BRASLAU <alan.braslau@cea.fr> wrote
> > 
> > On Sun, 2 Nov 2014 12:45:25 +0100
> > Robert Blackstone <blackstone.robert@gmail.com> wrote:
> > 
> >> 
> >> On 2 Nov 2014, at 12:00 ,  Pablo Rodriguez <oinos@gmx.es> wrote
> >>> 
> >>> I
> > Alphabetize letter by letter. When alphabetizing surnames, remember
> > that “nothing precedes something”: Brown, J. R., precedes Browning,
> > A. R., even though i precedes j in the alphabet.
> > 
> > Singh, Y., precedes Singh Siddhu, N. 
> > López, M. E., precedes López de Molina, G.
> > Ibn Abdulaziz, T., precedes Ibn Nidal, A. K. M.
> > Girard, J.-B., precedes Girard-Perregaux, A. S.
> > Villafuerte, S. A., precedes Villa-Lobos, J.
> > Benjamin, A. S., precedes ben Yaakov, D.
> 
> Hi Alan, 
> This still puzzles me a bit. 
> You write: “Brown, J. R., precedes Browning, A.R., even though i
> precedes j in the alphabet.” But isn’t that because “," precedes “i" ?
> Likewise, when sorting these names (with TeX-Edit Plus), Singh
> Siddhu, N. comes out  before Singh, Y., not the reverse, precisely
> because, as you say, “nothing precedes something”, or the space
> between Singh and Siddhu precedes  the comma between Singh and Y.
> Same with López de Molina, G. and López, M. E.
> 
> Or does ConTeXt, or TeX, have its own sorting order?

Please do not forget the \startquotation\stopquotation.

I am citing the APA rules, not stating anything on how ConTeXt (or
TeX-Edit or anything else) sorts lists in general.

Brown precedes Browning because APA sorts on last names.
Singh precedes Singh Siddhu because "nothing precedes
something"( Siddhu)
López precedes López de Molina for precisely the same reason.
Ibn Abdulaziz precedes Ibn Nidal because Ibn is not to be taken into
account.
Laue, M. von precedes Röntgen, W. C, as well as Van der Waals, J. D. but
here things start to get tricky!

My point is that sorting lists of course depends on what you are
listing. Indexing author names, for example, needs to sort on last
names, then first names. Indexing on several levels needs to sort first
by the first level, then by the second level, ...

When indexing items containing several words, the sorting should go
word by word, thus
tipografía digital
before
tipografías

This amounts to making whitespace higher precedence than anything else,
which I believe was not the case but now is fixed.

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

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

* Re: (again) bug in index sorting?
       [not found] <mailman.229.1415005279.2277.ntg-context@ntg.nl>
@ 2014-11-03 12:22 ` Robert Blackstone
  2014-11-03 13:50   ` Alan BRASLAU
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Blackstone @ 2014-11-03 12:22 UTC (permalink / raw)
  To: ntg-context


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


On 3 Nov 2014, at 10:01 , Alan BRASLAU <alan.braslau@cea.fr> wrote
> 
> On Sun, 2 Nov 2014 12:45:25 +0100
> Robert Blackstone <blackstone.robert@gmail.com> wrote:
> 
>> 
>> On 2 Nov 2014, at 12:00 ,  Pablo Rodriguez <oinos@gmx.es> wrote
>>> 
>>> I
> Alphabetize letter by letter. When alphabetizing surnames, remember
> that “nothing precedes something”: Brown, J. R., precedes Browning, A.
> R., even though i precedes j in the alphabet.
> 
> Singh, Y., precedes Singh Siddhu, N. 
> López, M. E., precedes López de Molina, G.
> Ibn Abdulaziz, T., precedes Ibn Nidal, A. K. M.
> Girard, J.-B., precedes Girard-Perregaux, A. S.
> Villafuerte, S. A., precedes Villa-Lobos, J.
> Benjamin, A. S., precedes ben Yaakov, D.

Hi Alan, 
This still puzzles me a bit. 
You write: “Brown, J. R., precedes Browning, A.R., even though i precedes j in the alphabet.” 
But isn’t that because “," precedes “i" ?
Likewise, when sorting these names (with TeX-Edit Plus), Singh Siddhu, N. comes out  before Singh, Y., not the reverse, precisely because, as you say, “nothing precedes something”, or the space between Singh and Siddhu precedes  the comma between Singh and Y.
Same with López de Molina, G. and López, M. E.

Or does ConTeXt, or TeX, have its own sorting order?

Best regards,
Robert Blackstone





[-- Attachment #1.2: Type: text/html, Size: 2036 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
___________________________________________________________________________________

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

* Re: (again) bug in index sorting?
  2014-11-02 11:45 ` Robert Blackstone
@ 2014-11-02 15:05   ` Alan BRASLAU
  0 siblings, 0 replies; 6+ messages in thread
From: Alan BRASLAU @ 2014-11-02 15:05 UTC (permalink / raw)
  Cc: ntg-context

On Sun, 2 Nov 2014 12:45:25 +0100
Robert Blackstone <blackstone.robert@gmail.com> wrote:

> 
> On 2 Nov 2014, at 12:00 ,  Pablo Rodriguez <oinos@gmx.es> wrote
> > 
> > I have the following sample:
> > 
> > \setuppapersize[A6]
> > \starttext
> > \index{tipografía digital}
> > \index{tipografías}
> > \index{tomato white}
> > \index{tomatoes red}
> > \index{idioma+de un pasaje}
> > \index{idioma+del documento}
> > \completeindex
> > \stoptext
> > 
> > Latest beta from 2014.10.31 12:47 sorts the index entries the
> > following way:
> > 
> > 	tomatoes red
> > 	tomato white
> > 
> > Of course, this sample doesn’t make sense, but the entries in
> > Spanish do. All of them are wrong sorted.
> > 
> > Stable version from 2014.01.03 00:40. The different sorting
> > criterium seems to have been introduced in beta from 2014.10.22
> > 16:23.
> > 
> > Or shouldn’t be the first word sorted first and then the second one
> > in index entry?
> > 
> > Could anyone be so kind to confirm the bug?
> > 
> > Many thanks for your help,
> > 
> > 
> > Pablo
> 
> Hi Pablo,
> I cannot confirm any bug, but what I would do anyway is to force the
> sorting in whatever order I want by using \index[]{} with the
> argument specifying the order. So your example could be:
> 
> \starttext
>    \index[tipograf\'{i}adig]{tipograf\'{i}a digital}
>    \index[tipograf\'{i}as]{tipograf\'{i}as}
>    \index[idiomadeu]{idioma+de un pasaje}
>    \index[idiomadel]{idioma+del documento}
>    \completeindex
>    \stoptext
> 
> if you want tipografias digital before tipografias.
> This works with all mkiv and mkii versions I have, including the ones
> that I installed today. I use it for a rather comlex three-level
> index and it works flawlessly (for me).

Because I have become obsessed with the APA style rules recently (;-),

\startquotation
Alphabetize letter by letter. When alphabetizing surnames, remember
that “nothing precedes something”: Brown, J. R., precedes Browning, A.
R., even though i precedes j in the alphabet.

Singh, Y., precedes Singh Siddhu, N. 
López, M. E., precedes López de Molina, G.
Ibn Abdulaziz, T., precedes Ibn Nidal, A. K. M.
Girard, J.-B., precedes Girard-Perregaux, A. S.
Villafuerte, S. A., precedes Villa-Lobos, J.
Benjamin, A. S., precedes ben Yaakov, D.
\stopquotation

Of course, these are names, a favorite subject that I share with Hans
these days...

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

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

* Re: (again) bug in index sorting?
       [not found] <mailman.1.1414926001.30175.ntg-context@ntg.nl>
@ 2014-11-02 11:45 ` Robert Blackstone
  2014-11-02 15:05   ` Alan BRASLAU
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Blackstone @ 2014-11-02 11:45 UTC (permalink / raw)
  To: ntg-context


On 2 Nov 2014, at 12:00 ,  Pablo Rodriguez <oinos@gmx.es> wrote
> 
> I have the following sample:
> 
> \setuppapersize[A6]
> \starttext
> \index{tipografía digital}
> \index{tipografías}
> \index{tomato white}
> \index{tomatoes red}
> \index{idioma+de un pasaje}
> \index{idioma+del documento}
> \completeindex
> \stoptext
> 
> Latest beta from 2014.10.31 12:47 sorts the index entries the following way:
> 
> 	tomatoes red
> 	tomato white
> 
> Of course, this sample doesn’t make sense, but the entries in Spanish
> do. All of them are wrong sorted.
> 
> Stable version from 2014.01.03 00:40. The different sorting criterium
> seems to have been introduced in beta from 2014.10.22 16:23.
> 
> Or shouldn’t be the first word sorted first and then the second one in
> index entry?
> 
> Could anyone be so kind to confirm the bug?
> 
> Many thanks for your help,
> 
> 
> Pablo

Hi Pablo,
I cannot confirm any bug, but what I would do anyway is to force the sorting in whatever order I want by using
\index[]{} with the argument specifying the order.
So your example could be:

\starttext
   \index[tipograf\'{i}adig]{tipograf\'{i}a digital}
   \index[tipograf\'{i}as]{tipograf\'{i}as}
   \index[idiomadeu]{idioma+de un pasaje}
   \index[idiomadel]{idioma+del documento}
   \completeindex
   \stoptext

if you want tipografias digital before tipografias.
This works with all mkiv and mkii versions I have, including the ones that I installed today. I use it for a rather comlex three-level index and it works flawlessly (for me).

Best regards,
Robert Blackstone

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

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

end of thread, other threads:[~2014-11-03 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-01 16:24 (again) bug in index sorting? Pablo Rodriguez
     [not found] <mailman.1.1414926001.30175.ntg-context@ntg.nl>
2014-11-02 11:45 ` Robert Blackstone
2014-11-02 15:05   ` Alan BRASLAU
     [not found] <mailman.229.1415005279.2277.ntg-context@ntg.nl>
2014-11-03 12:22 ` Robert Blackstone
2014-11-03 13:50   ` Alan BRASLAU
2014-11-03 18:11     ` Pablo Rodriguez

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