On 3-10-2010 12:58, Thomas A. Schmitz wrote:
On Oct 3, 2010, at 12:29 PM, Hans Hagen wrote:
indeed, and in a nice obscure way ...
\setuplayout[topspace=1cm,height=middle]
\setupbodyfont[11pt]
\starttext
\def\Test#1% {\vbox{{\bf#1}\blank\placeregister[index][language=cz,n=1,method={#1}]}\blank}
wanted result: oá öb Oč Öď Oo Öo oo öo Öq öř Oš oů \blank
\startcolumns[n=3] \Test{mc,mm,uc} \Test{mc,zm,uc} \Test{mc,pm,uc} \Test{zc,mm,uc} \Test{zc,zm,uc} \Test{zc,pm,uc} \Test{pc,mm,uc} \Test{pc,zm,uc} \Test{pc,pm,uc} \stopcolumns
\page
wanted result: oá öb Oč Öď Oo Öo oo öo Öq öř Oš oů \blank
\startcolumns[n=3] \Test{mm,mc,uc} \Test{zm,mc,uc} \Test{pm,mc,uc} \Test{mm,zc,uc} \Test{zm,zc,uc} \Test{pm,zc,uc} \Test{mm,pc,uc} \Test{zm,pc,uc} \Test{pm,pc,uc} \stopcolumns
\page
\dorecurse {2} { \page \recurselevel: \index{oá} \index{öb} \index{Oč} \index{Öď} \index{oo} \index{öo} \index{Oo} \index{Öo} \index{Öq} \index{öř} \index{Oš} \index{oů} done }
\stoptext
Give me a chance to understand :-) I tried looking in sort-ini.lua, but I couldn't figure out what the different methods meant. What do the abbreviations stand for? Also, I seem to obtain the desired case-insensitive sorting with method=zm,pc,uc but I also get spurious empty lines in the index. I'll try and come up with a minimal example.
mm zm pm : use mapping order, add -1,0, +1 to different case and use shape info for missing entries (similar shapes) mc zc pc : use mapping order, add -1,0, +1 to different case uc: unicode order so, you define a sequence of comparisons where for instance U -> order u +/- 1 \"u -> order of shape u +/- 1 etc .. a bit cryptic I admit ... some combinations give the same result depending on the vectors used. (Jano promissed to write up something.) numbers are sorted in a special way so, at some point we simplify characters and start looking at shapes and sort based on shapes which of course leads to clashes so in a next step we look at unicodes etc etc
2. Is it really a good idea to make case-sensitive sorting the default in English? I can't remember seeing a single academic book in English that has this sort of index sorting.
Currently Jano and I are figuring out some details (as Jano does the testing with more complex multilingual indices).
I have no preferece ... we can configure each language independently using the method key in the entries in sort-lan.lua As I seldom consult an index I have no clue what to expect or default to so feel free to tell me what the defaults should be. We now have predefined:
local predefinedmethods = { [variables.before] = "mm,mc,uc", [variables.after] = "pm,mc,uc", [variables.first] = "pc,mm,uc", [variables.last] = "mc,mm,uc", }
Hmm, if this is easy to configure, it doesn't make much of a difference. Just as a default, for English and German, I would suggest having no case-sensitivity. In German, umlauts are somewhat contentious, but nowadays, most people would sort them just like normal letters. But this is something that others on the list or on the wiki should express their opinion on.
best would be to have a test file per language with in comments the expected order; such tests should also provide foreign entries for instance, how would you mix german and greek in your books; we probably need some specialized vectors then, which is possible as the sorting language can be configured independent from the text language Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------