diff options
author | Norbert Preining <norbert@preining.info> | 2020-06-04 03:02:40 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-06-04 03:02:40 +0000 |
commit | 6c90555ebb89f41cc4dfb6cf3ee6bfaa8107650e (patch) | |
tree | d3475ab1d6bd6675a0975dfa6059602be057f0d5 /indexing/xindex/lualatex/xindex-base.lua | |
parent | 44fde4a143b75ae4f383b05832343d497c254989 (diff) |
CTAN sync 202006040302
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 |