diff options
Diffstat (limited to 'indexing/xindex/lualatex/xindex-base.lua')
-rw-r--r-- | indexing/xindex/lualatex/xindex-base.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indexing/xindex/lualatex/xindex-base.lua b/indexing/xindex/lualatex/xindex-base.lua index 9d36d5ddd2..6c51f21763 100644 --- a/indexing/xindex/lualatex/xindex-base.lua +++ b/indexing/xindex/lualatex/xindex-base.lua @@ -6,7 +6,7 @@ -- LICENSE: LPPL1.3 ----------------------------------------------------------------------- -local info = { version = 0.22 } +local info = { version = 0.23 } -- check config if pageNoPrefixDel ~= "" then @@ -120,6 +120,21 @@ for i, str0 in ipairs(escape_chars) do end ]] -- no more needed, we redo the setting +if use_UCA then + for i=1, #NewIndex do + v = NewIndex[i] + -- the collator:get_lowest_char will return character on the given + -- position. It will be lowercase and without accents. + local codepoints = collator_obj:string_to_codepoints(NormalizedUpper(v.SortKey)) + v.sortChar = getSortChar(codepoints) --or getSortChar(collator_obj:string_to_codepoints(NormalizedUpper(v.Entry))) + if not v.sortChar then + -- alternativelly use v.Entry if SortKey doesn't contain usable string + codepoints = collator_obj:string_to_codepoints(NormalizedUpper(v.Entry)) + v.sortChar = getSortChar(codepoints) + end + end +end + if SORTendhook then NewIndex = SORTendhook(NewIndex) end |