texlive[71279] trunk: xindex (18may24)

commits+karl at tug.org commits+karl at tug.org
Sat May 18 00:14:29 CEST 2024


Revision: 71279
          https://tug.org/svn/texlive?view=revision&revision=71279
Author:   karl
Date:     2024-05-18 00:14:29 +0200 (Sat, 18 May 2024)
Log Message:
-----------
xindex (18may24)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
    trunk/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
    trunk/Master/texmf-dist/doc/lualatex/xindex/README.md
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex
    trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
    trunk/Master/texmf-dist/scripts/xindex/xindex.lua
    trunk/Master/texmf-dist/tex/latex/xindex/xindex.sty
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-AU.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-RU.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-danteedition.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.idx
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.ind
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.tex
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-no_uca.lua

Removed Paths:
-------------
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua

Modified: trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.55
+ local version = 0.60
 xindex.version = version
 --xindex.self = "xindex"
 
@@ -46,7 +46,7 @@
     -V,--version
     -a,--no_casesensitive
     -b,--no_labels
-    -c,--config (default cfg)
+    -c,--config (default "")
     -e,--escapechar (default ")
     -f,--fix_hyperref
     -g,--no_pagenumber
@@ -57,7 +57,8 @@
     -o,--output (default "")
     -p,--prefix (default L)
     -s,--use_stdin
-    -u,--use_UCA 
+    -u,--use_UCA     no more needed
+    -x,--no_UCA
     <files...> (default stdin) .idx file(s)
 ]]
 
@@ -170,7 +171,6 @@
 
 logFile = io.open(logfilename,"w+")
 require('xindex-lib')
-
 writeLog(2,"xindex v."..version.." (c) Herbert Voß\n",-1)
 writeLog(1,"Verbose level = "..vlevel.."\n",1)
 writeLog(2,"Logfile:"..logfilename.."\n",1)
@@ -202,45 +202,13 @@
 labelPrefix = args.prefix
 writeLog(2,"Label prefix: "..labelPrefix.."\n",-1)
 
-writeLog(2,"Loading common config file ".."xindex-cfg-common\n",1)
+writeLog(2,"Loading all config files ... \n",1) 
+writeLog(2,"Loading common config file ".."xindex-cfg-common\n",1) -- we need config for lang setting
 Config_File_Common = kpse.find_file("xindex-cfg-common.lua") 
 cfg_common = require(Config_File_Common)
 
-local user_config_file = "xindex-"..args["config"]..".lua"
-print("Local config file is: "..user_config_file)
-writeLog(2,"Loading local config file "..user_config_file,0)
-if kpse.find_file(user_config_file) 
-  then Config_File = kpse.find_file(user_config_file) 
-  else print("Cannot find config file with kpse.find_file!!")
-end
-print("\nLocal KPSE config file is: "..Config_File.."\n")
-cfg = require(Config_File)
-writeLog(2," ... done\n",0)
-
--- Create the character list maps for faster sorting
-
-alphabet_lower_map = CreateCharListMap(alphabet_lower)
-alphabet_upper_map = CreateCharListMap(alphabet_upper)
-
-esc_char = args.escapechar
-esc_char2 = esc_char..esc_char  
-writeLog(2,"Escapechar = "..esc_char.."\n",1)
-escape_chars = { -- by default " is the escape char
-  {esc_char2,     '//escaped2//', esc_char    },
-  {esc_char..'@', '//escapedat//',    '@'    },
-  {esc_char..'|', '//escapedvert//',  '|'    },
-  {esc_char..'!', '//escapedexcl//',  '!'    },
-  {'',            '\\textbar',        '|'    },  
-  {'',            '\\braceLeft',      '{'    },  
-  {'',            '\\braceRight',     '}'    }
-}
-
-outFile = io.open(outfilename,"w+")
-
 check_language = args["checklang"]
 local aux_language = ""
-
-
 if check_language then
   print("check aux file for unknown language")
 --  writeLog(2,'Check language in aux file\n',0) 
@@ -287,24 +255,9 @@
   end
 end
 
---print("Sprache:"..language)
+-- next config is UCA
 
-writeLog(2,"Language = "..language.."\n",1) 
-if (indexheader[language] == nil) then
-  writeLog(2,'Corrected the unknown language "'..language..'" to "en"'.."\n",0) 
-  language = "en"
-end  
-
-index_header = indexheader[language]
-if vlevel > 0 then for i=1,#index_header do writeLog(2,index_header[i].."\n",1) end end
-if (folium[language] == nil) then
-  writeLog(2,'Corrected the unknown language "'..language..'" for page folium to "en"'.."\n",0) 
-  page_folium = folium["en"]
-else
-  page_folium = folium[language]
-end  
-
-use_UCA = args["use_UCA"]
+use_UCA = not args["no_UCA"]
 if use_UCA then
   writeLog(1,"Will use LUA-UCA\n",1)
   ducet = require "lua-uca.lua-uca-ducet"
@@ -311,8 +264,8 @@
   collator = require "lua-uca.lua-uca-collator"
   languages = require "lua-uca.lua-uca-languages"
   collator_obj = collator.new(ducet)
-  
-  local uca_config_file = "xindex-cfg-uca.lua"
+
+  uca_config_file = "xindex-cfg-uca.lua"      -- for additional language definition
   writeLog(2,"Loading local UCA config file "..uca_config_file,0)
   UCA_Config_File = kpse.find_file(uca_config_file) 
   uca_cfg = require(UCA_Config_File)
@@ -331,12 +284,67 @@
     print("[Lua-UCA] Loading language: " .. language)
     collator_obj = languages[language](collator_obj)
   end
+  alphabet_lower_map = {}   -- empty tables for UCA sorting
+  alphabet_upper_map = {}
 else
   writeLog(1,"Will _not_ use LUA-UCA\n",1)
+  -- Create the character list maps for faster sorting if not using UCA
+  writeLog(2,"Loading config file for no UCA".."xindex-cfg-no_uca\n",1)
+  Config_File_UCA = kpse.find_file("xindex-cfg-no_uca.lua") 
+  cfg_UCA = require(Config_File_UCA)
+  alphabet_lower_map = CreateCharListMap(alphabet_lower)
+  alphabet_upper_map = CreateCharListMap(alphabet_upper)
 end
 
-upper = unicode.utf8.upper
+-- at last the user config
 
+if args["config"] ~= '""' then
+  local user_config_file = "xindex-"..args["config"]..".lua"
+  print("Local config file is: "..user_config_file)
+  writeLog(2,"Loading local config file "..user_config_file,0)
+  if kpse.find_file(user_config_file) then 
+    Config_File = kpse.find_file(user_config_file) 
+  else 
+    Config_File = ""
+    print("Cannot find config file with kpse.find_file!!")
+  end
+  print("\nLocal KPSE config file is: "..Config_File.."\n")
+  cfg = require(Config_File)
+  writeLog(2," ... done\n",0)
+end
+
+--print("Sprache:"..language)
+
+writeLog(2,"Language = "..language.."\n",1) 
+if (indexheader[language] == nil) then
+  writeLog(2,'Corrected the unknown language "'..language..'" to "en"'.."\n",0) 
+  language = "en"
+end  
+
+index_header = indexheader[language]
+if vlevel > 0 then for i=1,#index_header do writeLog(2,index_header[i].."\n",1) end end
+if (folium[language] == nil) then
+  writeLog(2,'Corrected the unknown language "'..language..'" for page folium to "en"'.."\n",0) 
+  page_folium = folium["en"]
+else
+  page_folium = folium[language]
+end  
+
+
+
+esc_char = args.escapechar
+esc_char2 = esc_char..esc_char  
+writeLog(2,"Escapechar = "..esc_char.."\n",1)
+escape_chars = { -- by default " is the escape char
+  {esc_char2,     '//escaped2//', esc_char    },
+  {esc_char..'@', '//escapedat//',    '@'    },
+  {esc_char..'|', '//escapedvert//',  '|'    },
+  {esc_char..'!', '//escapedexcl//',  '!'    },
+  {'',            '\\textbar',        '|'    },  
+  {'',            '\\braceLeft',      '{'    },  
+  {'',            '\\braceRight',     '}'    }
+}
+
 no_caseSensitive = args["no_casesensitive"]
 if no_caseSensitive then
   writeLog(1,"Sorting will be no case sensitive\n",1)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG	2024-05-17 22:14:29 UTC (rev 71279)
@@ -1,3 +1,9 @@
+0.60  2024-05-16 - more fixes for UCA as default mode
+0.59  2024-05-13 - removed the xindex-cfg.lua
+0.58  2024-05-12 - Use UCA as default
+                   fix for french sorting
+0.57  2024-01-20 - Test version for UCA
+0.56  2024-01-12 - fix for leading spaces of index entries
 0.55  2023-07-30 - fix for wrong presort -- disabled the use of \writeidx
 0.54  2023-07-28 - do not print control output for testing
 0.53  2023-07-16 - added function literize to escape special lua characters

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/README.md	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/README.md	2024-05-17 22:14:29 UTC (rev 71279)
@@ -1,6 +1,8 @@
 # xindex
 
-Copyright 2019-2023 Herbert Voß
+Copyright 2019-2024 Herbert Voß
+The files xindex-lapp.lua and xindex-pretty.lua have the MIT licence.
+all other files are LPPL 1.3
 
 Unicode compatible index programm for LaTeX. It needs Lua 5.3 which
 will be included in at least LuaTeX 1.09 (TeXLive 2019)
@@ -7,9 +9,9 @@
 
 
 * xindex.lua            -- main file
-* xindex-cfg.lua        -- config module
 * xindex-cfg-common.lua -- main config module
 * xindex-cfg-uca.lua    -- config module for uca
+* xindex-cfg-no_uca.lua -- config module for old mode
 * xindex-base.lua       -- base file
 * xindex-baselib.lua    -- base file
 * xindex-lib.lua        -- functions module
@@ -37,9 +39,9 @@
     -o,--output (default "")
     -l,--language (default en)
     -p,--prefix (default L)
-    -u,--use_UCA
     -g,--no_pagenumber
     -s,--use_stdin
+    -x,--no_UCA
     -V,--version
     <files...> (default stdin) .idx file(s)
 

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex	2024-05-17 22:14:29 UTC (rev 71279)
@@ -14,7 +14,7 @@
 \makeatother
 
 \begin{document}
-Run with \verb|xindex --config HAdW-eKO|
+Run with \verb|xindex --config HAdW-eKO -x|   no UCA
 
 \printindex
 \end{document}

Added: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.idx
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.idx	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.idx	2024-05-17 22:14:29 UTC (rev 71279)
@@ -0,0 +1,46 @@
+\indexentry{CÔTÉ}{1}
+\indexentry{cote}{1}
+\indexentry{Côté}{1}
+\indexentry{COTÉ}{1}
+\indexentry{côte}{1}
+\indexentry{COTE}{1}
+\indexentry{côté}{1}
+\indexentry{Coté}{1}
+\indexentry{coté}{1}
+\indexentry{Cote}{1}
+\indexentry{CÔTE}{1}
+\indexentry{Côte}{1}
+\indexentry{lésé}{1}
+\indexentry{péché}{1}
+\indexentry{bohème}{1}
+\indexentry{gêné}{1}
+\indexentry{pêche}{1}
+\indexentry{cæsium}{1}
+\indexentry{pêcher}{1}
+\indexentry{révèle}{1}
+\indexentry{pécher}{1}
+\indexentry{révélé}{1}
+\indexentry{Bohême}{1}
+\indexentry{relève}{1}
+\indexentry{PÉCHÉ}{1}
+\indexentry{maçon}{1}
+\indexentry{relevé}{1}
+\indexentry{Élève}{1}
+\indexentry{gêne}{1}
+\indexentry{élevé}{1}
+\indexentry{MÂCON}{1}
+\indexentry{gène}{1}
+\indexentry{Bohémien}{1}
+\indexentry{caennais}{1}
+\indexentry{lèse}{1}
+\indexentry{coexistence}{1}
+\indexentry{cœur}{1}
+\indexentry{coefficient}{1}
+\indexentry{cafard}{1}
+\indexentry{CŒUR}{1}
+\indexentry{CÆSIUM}{1}
+\indexentry{coté}{1}
+\indexentry{cœur}{1}
+\indexentry{péché}{1}
+\indexentry{coté}{2}
+\indexentry{coefficient}{2}


Property changes on: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.idx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.ind
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.ind	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.ind	2024-05-17 22:14:29 UTC (rev 71279)
@@ -0,0 +1,76 @@
+
+\begin{theindex}
+
+\indexspace
+\textbf{B}\label{L-xindex-B}
+\nopagebreak[4]
+  \item bohème, {1}
+  \item Bohême, {1}
+  \item Bohémien, {1}
+
+\indexspace
+\textbf{C}\label{L-xindex-C}
+\nopagebreak[4]
+  \item caennais, {1}
+  \item cæsium, {1}
+  \item CÆSIUM, {1}
+  \item cafard, {1}
+  \item coefficient, {1\,sq.}
+  \item cœur, {1}
+  \item CŒUR, {1}
+  \item coexistence, {1}
+  \item cote, {1}
+  \item Cote, {1}
+  \item COTE, {1}
+  \item côte, {1}
+  \item Côte, {1}
+  \item CÔTE, {1}
+  \item coté, {1\,sq.}
+  \item Coté, {1}
+  \item COTÉ, {1}
+  \item côté, {1}
+  \item Côté, {1}
+  \item CÔTÉ, {1}
+
+\indexspace
+\textbf{E}\label{L-xindex-E}
+\nopagebreak[4]
+  \item Élève, {1}
+  \item élevé, {1}
+
+\indexspace
+\textbf{G}\label{L-xindex-G}
+\nopagebreak[4]
+  \item gène, {1}
+  \item gêne, {1}
+  \item gêné, {1}
+
+\indexspace
+\textbf{L}\label{L-xindex-L}
+\nopagebreak[4]
+  \item lèse, {1}
+  \item lésé, {1}
+
+\indexspace
+\textbf{M}\label{L-xindex-M}
+\nopagebreak[4]
+  \item MÂCON, {1}
+  \item maçon, {1}
+
+\indexspace
+\textbf{P}\label{L-xindex-P}
+\nopagebreak[4]
+  \item pêche, {1}
+  \item péché, {1}
+  \item PÉCHÉ, {1}
+  \item pécher, {1}
+  \item pêcher, {1}
+
+\indexspace
+\textbf{R}\label{L-xindex-R}
+\nopagebreak[4]
+  \item relève, {1}
+  \item relevé, {1}
+  \item révèle, {1}
+  \item révélé, {1}
+\end{theindex}


Property changes on: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.ind
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf	2024-05-17 22:14:29 UTC (rev 71279)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.tex	2024-05-17 22:14:29 UTC (rev 71279)
@@ -0,0 +1,20 @@
+\documentclass[paper=a4,twocolumn]{scrartcl}
+\usepackage{libertinus-otf}
+\usepackage[french]{babel}
+\usepackage{makeidx} \makeindex
+\newcommand*{\IND}[1]{\index{#1}#1\par}
+\begin{document}
+%%% xindex -l fr <file>
+\IND{CÔTÉ} \IND{cote} \IND{Côté} \IND{COTÉ} \IND{côte} 
+\IND{COTE} \IND{côté} \IND{Coté} \IND{coté} \IND{Cote} 
+\IND{CÔTE} \IND{Côte} \IND{lésé} \IND{péché} 
+\IND{bohème} \IND{gêné} \IND{pêche} \IND{cæsium} 
+\IND{pêcher} \IND{révèle} \IND{pécher} \IND{révélé} 
+\IND{Bohême} \IND{relève} \IND{PÉCHÉ} \IND{maçon} 
+\IND{relevé} \IND{Élève} \IND{gêne} \IND{élevé} 
+\IND{MÂCON} \IND{gène} \IND{Bohémien} \IND{caennais} 
+\IND{lèse} \IND{coexistence} \IND{cœur} 
+\IND{coefficient} \IND{cafard} \IND{CŒUR} \IND{CÆSIUM}
+\newpage \IND{coté} \IND{cœur} \IND{péché} \newpage
+\IND{coté}\IND{coefficient} \printindex
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/french.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex	2024-05-17 22:14:29 UTC (rev 71279)
@@ -81,7 +81,7 @@
 \def\setVersion#1{\setVVersion#1!!}
 \def\setVVersion#1=#2!!{\def\xIndexVersion{#2}} 
 
-\setVersion{version = 0.55}%  can be automatically changed by perl
+\setVersion{version = 0.59}%  can be automatically changed by perl
 
 
 
@@ -102,7 +102,7 @@
 Denis Bitouzé;
 Andreas Deininger;
 Brian Dunn;
-Gonzalo Pesquero Serrano;
+Daniel Flipo;
 Michal Hoftich;
 Mykel Kochenderfer;
 Alexey Kuznetsov;
@@ -112,6 +112,7 @@
 Matteo Paolini;
 Stefan Pinnow;
 Florent Rougon;
+Gonzalo Pesquero Serrano;
 Martin Sievers;
 Simon Spiegel;
 Jürgen Spitzmüller;
@@ -167,7 +168,7 @@
 \subsection{Syntax}
 
 The \Index{syntax} is \verb|xindex [...] <file(s)>| where \verb|[...]|  are optional \Index{argument}s, either in short or
-long form which, of course, can be mixed:
+long7 form which, of course, can be mixed:
 
 \begin{verbatim}
 xindex
@@ -188,7 +189,7 @@
     [-o,--output ]                        default is <input>.ind
     [-p,--prefix]                         default L
     [-s,--use_stdin ]                     default is false
-    [-u,--use_UCA ]                       default is false    
+    [-x,--no_UCA ]                        default is false    
     <files...> (default stdin) file(s)[.idx]   one or more files
 \end{verbatim}
 
@@ -269,19 +270,19 @@
   compiler=lualatex,
   crop,
   xindex,
-  xindexOptions=-u,  % use unicode
+  xindexOptions=-l fr, 
   runs=2,code,docType=latex,
   showFilename,
   align=\centering,
   lstOptions={columns=fixed}]{xindex}
 %! lualatex
-%! xindex -u (use unicode)
 \documentclass{scrartcl}
+\usepackage{multicol}
 \makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
+\renewenvironment{theindex}{%    only for demonstration
+  \begin{multicols}{2}[\section*{\indexname}]
   \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
+  \let\item\@idxitem}{\end{multicols}}
 \makeatother
 %StartVisiblePreamble
 \usepackage{makeidx}\makeindex
@@ -299,9 +300,9 @@
 \item Left paranthesis \{ \index{\braceLeft}
 \item Right paranthesis \}  \index{\braceRight}
 \end{itemize}
-run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+run \texttt{xindex -l fr <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
 \index{Etage} \index{Ètagé}
-\newpage
+\twocolumn
 \printindex
 \end{document}
 \end{externalDocument}
@@ -310,7 +311,7 @@
 xindex defines the two commands \Lcs{braceLeft} and \Lcs{braceRight} which can be used instead
 (see examples above and and below).
 
-The same example without using unicode sorting (no option \Loption{-u}):
+The same example without using unicode sorting (option \Loption{-x}):
 
 
 \begin{externalDocument}[
@@ -320,7 +321,7 @@
   compiler=lualatex,
   crop,
   xindex,
-%  xindexOptions=-u,  % use unicode
+  xindexOptions=-x,  % do not use unicode
   runs=2,code,docType=latex,
   showFilename,
   align=\centering,
@@ -328,11 +329,12 @@
 %! lualatex
 %! xindex  (no unicode sort -- simple ascii)
 \documentclass{scrartcl}
+\usepackage{multicol}
 \makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
+\renewenvironment{theindex}{%    only for demonstration
+  \begin{multicols}{2}[\section*{\indexname}]
   \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
+  \let\item\@idxitem}{\end{multicols}}
 \makeatother
 %StartVisiblePreamble
 \usepackage{makeidx}\makeindex
@@ -350,9 +352,9 @@
 \item Left paranthesis \{ \index{\braceLeft}
 \item Right paranthesis \}  \index{\braceRight}
 \end{itemize}
-run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
+run \texttt{xindex -x <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
 \index{Etage} \index{Ètagé}
-\newpage
+\twocolumn
 \printindex
 \end{document}
 \end{externalDocument}
@@ -386,9 +388,8 @@
   frame,
   compiler=lualatex,
   crop,
-  force=false,
   xindex,
-  xindexOptions=-e ">",
+  xindexOptions=-e ">" -n,
   runs=2,code,docType=latex,
   showFilename,
   align=\centering,
@@ -417,7 +418,7 @@
 \item Group start \{ \index{\braceLeft}
 \item Group end \{ \index{\braceRight}
 \end{itemize}
-Run \texttt{xindex} with \texttt{xindex -e ">"}\index{<file.idx>}\index{123}
+Run \texttt{xindex} with \texttt{xindex -e ">" -n}\index{<file.idx>}\index{123}
 \newpage
 \printindex
 \end{document}
@@ -457,7 +458,6 @@
   frame,
   compiler=lualatex,
   crop,
-  force=false,
   xindex,
   xindexOptions=-l it -e ">",
   runs=2,code,docType=latex,
@@ -467,11 +467,12 @@
 %! lualatex
 \documentclass{scrartcl}
 \usepackage[italian]{babel}
+\usepackage{multicol}
 \makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
+\renewenvironment{theindex}{%    only for demonstration
+  \begin{multicols}{2}[\section*{\indexname}]
   \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
+  \let\item\@idxitem}{\end{multicols}}
 \makeatother
 %StartVisiblePreamble
 \usepackage{makeidx}\makeindex
@@ -487,8 +488,7 @@
 \item At siboli @ \index{At (>@)}
 \end{itemize}
 Initio \texttt{xindex} con \texttt{xindex -l it -e ">"}\index{123}
-\newpage
-\printindex
+\twocolumn \printindex
 \end{document}
 \end{externalDocument}
 
@@ -504,7 +504,6 @@
   frame,
   compiler=lualatex,
   crop,
-  force=false,
   xindex,
   xindexOptions=-k -e "?",
   runs=2,code,docType=latex,
@@ -513,11 +512,12 @@
   lstOptions={columns=fixed}]{xindex}
 %! lualatex
 \documentclass{scrartcl}
+\usepackage{multicol}
 \makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
+\renewenvironment{theindex}{%    only for demonstration
+  \begin{multicols}{2}[\section*{\indexname}]
   \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
+  \let\item\@idxitem}{\end{multicols}}
 \makeatother
 %StartVisiblePreamble
 \usepackage[dutch]{babel} % !!!!
@@ -534,7 +534,7 @@
 \item At character @ \index{At (?@)}\index{?@}
 \end{itemize}
 Run \texttt{xindex} with \texttt{xindex -k -e "?"}\index{123}
-\newpage\index{xindex@\texttt{xindex}}
+\twocolumn\index{xindex@\texttt{xindex}}
 \printindex
 \end{document}
 \end{externalDocument}
@@ -554,8 +554,9 @@
   frame,
   compiler=lualatex,
   crop,
+  force,
   xindex,
-  xindexOptions=-u -l RU -c RU,
+  xindexOptions=-l RU -c RU -n,
   runs=2,code,docType=latex,
   showFilename,
   align=\centering,
@@ -564,11 +565,12 @@
 ]{xindex}
 %! lualatex
 \documentclass{scrartcl}
+\usepackage{multicol}
 \makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
+\renewenvironment{theindex}{%    only for demonstration
+  \begin{multicols}{2}[\section*{\indexname}]
   \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
+  \let\item\@idxitem}{\end{multicols}}
 \makeatother
 %StartVisiblePreamble
 \usepackage[russian]{babel}
@@ -575,7 +577,7 @@
 \usepackage{fontspec}
 \usepackage[regular]{newcomputermodern}
 \defaultfontfeatures{Ligatures=TeX}
-\usepackage{xindex}\makeindex   % run with xindex -u -l RU -c RU <file>
+\usepackage{xindex}\makeindex   % run with xindex -l RU -c RU <file>
 %StopVisiblePreamble
 \pagestyle{empty}
 \begin{document}
@@ -599,7 +601,7 @@
   \verb|\index{Ёж!ушастый (Hemiechinus auritus)}|%
   \index{Ёж!ушастый (Hemiechinus auritus)}
 \end{tabular}
-\printindex  % xindex -u -l RU -c RU <file>
+\printindex  % xindex -l RU -c RU -n <file>
 \end{document}
 \end{externalDocument}
 
@@ -609,9 +611,208 @@
 
 
 \section{Sorting}
+
+
+
+\subsection{Default sorting by the UCA (Unicode Collection Algorithm)}
+This Lua library from Michal Hoftich is part of \TeXLive\ and is used by default
+for sorting. The supported languages and variants are listed in the file 
+\Lfile{lua-uca-languages.lua}:
+
+\texttt{af, 
+am, 
+ar, 
+as, 
+az, 
+be, 
+bg, 
+bn, 
+bs, 
+bs\_cyrl, 
+ca, 
+chr, 
+cs, 
+cy, 
+da, 
+de, 
+de\_din2, 
+dsb, 
+dz, 
+ee, 
+el, 
+en, 
+eo, 
+es, 
+et, 
+fa, 
+fi, 
+fil, 
+fo, 
+fr, 
+fr\_backward\_accents, 
+ga, 
+gl, 
+gu, 
+ha, 
+haw, 
+he, 
+hr, 
+hi, 
+hsb, 
+hu, 
+hy, 
+id, 
+ig, 
+is, 
+it, 
+ja, 
+ka, 
+kk, 
+kl, 
+km, 
+kn, 
+ko, 
+kok, 
+ky, 
+lb, 
+lkt, 
+ln, 
+lo, 
+lt, 
+lv, 
+mk, 
+ml, 
+mn, 
+mr, 
+ms, 
+mt, 
+my, 
+nb, 
+ne, 
+nl, 
+nn, 
+no, 
+om, 
+pa, 
+pl, 
+ps, 
+pt, 
+ro, 
+ru, 
+se, 
+si, 
+sk, 
+sl, 
+smn, 
+sq, 
+sr, 
+sr\_latn, 
+sv, 
+sw, 
+ta, 
+te, 
+th, 
+tk, 
+to, 
+tr, 
+ug, 
+uk, 
+ur, 
+uz, 
+vi, 
+vo, 
+wae, 
+wo, 
+yi, 
+yo, 
+zh, 
+zu}
+
+
+
+The sorting order can be easily modified. Read the documentation of the package \texttt{LUA-UCA}
+on how to do it and what languages are supported so far. Any additional code setting for
+UCA should be done in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read
+by \Lprog{xindex}.
+
+\begin{importantblock}
+If possible, you should use the Unicode sorting by default and only for some special cases
+where you define your own sorting scheme, you should use the \verb|-x| option.
+\end{importantblock}
+
+
+\begin{externalDocument}[
+%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.55\linewidth,
+%  pages={6},
+  frame=false,
+  compiler=lualatex,
+  crop,
+  xindex,
+  xindexOptions=-l cs,
+  runs=2,code,docType=latex,
+  showFilename,
+  align=\centering,
+  usefancyvrb,
+%  lstOptions={columns=fixed}
+]{xindex}
+%! lualatex
+\documentclass[paper=a6]{scrartcl}
+\makeatletter
+\def\theindex{%    only for demonstration
+  \section*{\indexname}
+  \parskip\z@ \@plus .3\p@\relax \parindent\z@
+  \let\item\@idxitem}
+\makeatother
+%StartVisiblePreamble
+\usepackage{multicol}
+\usepackage{makeidx}\makeindex
+\def\Index#1{#1\index{#1}}
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+Sorted with \verb|-l cs|
+\Index{ahoj} \Index{crha}, \Index{čaj}, \Index{chachar}, 
+\Index{rak}, \Index{řeka}, \Index{srp}, \Index{šutr}, 
+\Index{hudba}, \Index{linux}, \Index{zebra}, 
+\Index{žába}, \Index{7 dubů}
+\begin{multicols}{2} \printindex \end{multicols}
+\end{document}
+\end{externalDocument}
+
+
+
+
+Modifications can be done in a config file which is then loaded by the
+option \texttt{-c}. For example: the file \Lfile{xindex-cfg-uca.lua} has
+modification for french and norwegian. For french the standard sorting rules 
+\texttt{fr\_backward\_accents}, are a bit
+special and should be the default also for the  language \texttt{fr}:
+
+\begin{verbatim}
+languages.fr = function(collator_obj)
+   -- reverse search for accents in French (recommended):
+  collator_obj.accents_backward = true
+  local tailoring = function(s) collator_obj:tailor_string(s) end
+  tailoring("&æ=ae")
+  tailoring("&œ=oe")
+  tailoring("&th<þ<<<Þ")       -- Canadian, see SGQRI004.pdf
+  return collator_obj
+end 
+\end{verbatim}
+
+Add any additional modifications to this file or create an own
+config file and load it with \texttt{-c}.
+
+
 \subsection{Default sorting by a character table}
-The default sorting is unicode aware and uses a translation table for accented characters:
+This sorting is not completely unicode aware. It uses a translation table for accented characters,
+which should only be used if the standard sorting method with UCA is not possible! This kind of sortierung
+has to be choosed by the option \texttt{-x} (don't use UCA).  The option \texttt{-u} for
+using UCA is deprecated, because using UCA is the default.
 
+Again, if on wants to use an own transformation table, then use something like:
+
 \begin{verbatim}
 alphabet_lower = { --   for sorting
     { ' ' },  -- only for internal tests
@@ -684,6 +885,8 @@
 \end{verbatim}
 
 
+\subsection{Examples}
+\subsubsection{German language and no UCA}
 
 \begin{externalDocument}[
   grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
@@ -693,7 +896,7 @@
   compiler=lualatex,
   crop,
   xindex,
-  xindexOptions=-l de,
+  xindexOptions=-l de -x,
   runs=2,code,docType=latex,
   showFilename,
   usefancyvrb,
@@ -719,8 +922,7 @@
 \makeatother
 \pagestyle{empty}
 \begin{document}
-Sorted with \verb|-l DE|
-
+Sorted with \verb|-l DE -x|\par
 \Index{Österreich} \Index{Öresund} 
 \Index{Ostern} \Index{Ober} 
 \Index{Oberin} \Index{Österreich} 
@@ -740,10 +942,9 @@
 \end{externalDocument}
 
 
+\subsubsection{German language (DIN2) and no UCA}
 
-The same sorted with the German DIN variant 2 with \verb|--config DIN2|, which
-is part of the \TeX\ distribution. In this case a letter Ö is converted to Oe before sorting
-the word beginning with the letter Ö:
+In this case a letter Ö, Ä, Ü, ö, ä, ü is converted to Oe, Ae, Ue, oe, ae, ue before sorting:
 
 \noindent
 \begin{externalDocument}[
@@ -750,6 +951,123 @@
   grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
   mpwidth=0.4\linewidth,
   pages={2},
+  frame=false,
+  compiler=lualatex,
+  crop,
+  xindex,
+  xindexOptions=-c DIN2 -l DE -x,
+  runs=2,code,docType=latex,
+  showFilename,
+  align=\centering,
+  lstOptions={columns=fixed}]{xindex}
+%! lualatex
+\documentclass[paper=a5]{scrartcl}
+\usepackage[ngerman]{babel}
+%StartVisiblePreamble
+\usepackage{makeidx}\makeindex
+\newcommand\Index[1]{\index{#1}#1}
+%StopVisiblePreamble
+\usepackage{multicol}
+\makeatletter
+\def\theindex{%    only for demonstration
+  \newpage
+  \section*{\indexname}
+  \begin{multicols}{2}
+  \parskip\z@ \@plus .3\p@\relax \parindent\z@
+  \let\item\@idxitem}
+\def\endtheindex{\end{multicols}}
+\makeatother
+\pagestyle{empty}
+\begin{document}
+Sorted with 
+\verb|--config DIN2 -l DE -x|
+
+\Index{Österreich} \Index{Öresund} 
+\Index{Ostern} \Index{Ober} 
+\Index{Oberin} \Index{Österreich} 
+\Index{Öresund} \Index{Ostern} 
+\Index{Ober} \Index{Oberin} 
+\Index{Obstler} \Index{Öl} 
+\Index{ölen} \Index{Ödem} 
+\Index{Oligarch} \Index{Oder} 
+\Index{oder} \index{Fluss!Oder} 
+\index{Oder|seealso{Fluss}} 
+\Index{Göbel} \Index{Goethe} 
+\Index{Göthe} \Index{Götz} 
+\Index{Goldmann}
+\printindex
+\end{document}
+\end{externalDocument}
+
+
+
+\subsubsection{German language with UCA}
+
+\begin{externalDocument}[
+  grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.4\linewidth,
+  pages={2},
+  frame=false,
+  compiler=lualatex,
+  force,
+  crop,
+  xindex,
+  xindexOptions=-l de, % german and UCA
+  runs=2,code,docType=latex,
+  showFilename,
+  usefancyvrb,
+  align=\centering,
+%  lstOptions={columns=fixed}
+]{xindex}
+%! lualatex
+\documentclass[paper=a5]{scrartcl}
+\usepackage[ngerman]{babel}
+%StartVisiblePreamble
+\usepackage{makeidx}\makeindex
+\newcommand\Index[1]{\index{#1}#1}
+%StopVisiblePreamble
+\usepackage{multicol}
+\makeatletter
+\def\theindex{%    only for demonstration
+  \newpage
+  \section*{\indexname}
+  \begin{multicols}{2}
+  \parskip\z@ \@plus .3\p@\relax \parindent\z@
+  \let\item\@idxitem}
+\def\endtheindex{\end{multicols}}
+\makeatother
+\pagestyle{empty}
+\begin{document}
+Sorted with \verb|-l DE| and using UCA\par
+\Index{Österreich} \Index{Öresund} 
+\Index{Ostern} \Index{Ober} 
+\Index{Oberin} \Index{Österreich} 
+\Index{Öresund} \Index{Ostern} 
+\Index{Ober} \Index{Oberin} 
+\Index{Obstler} \Index{Öl} 
+\Index{ölen} \Index{Ödem} 
+\Index{Oligarch} \Index{Oder} 
+\Index{oder} \index{Fluss!Oder} 
+\index{Oder|seealso{Fluss}} 
+\Index{Göbel} \Index{Goethe} 
+\Index{Göthe} \Index{Götz} 
+\Index{Goldmann}
+\printindex
+\end{document}
+\end{externalDocument}
+
+\subsubsection{German language (DIN2) with UCA}
+
+The same sorted with the German DIN variant 2. It uses also the config
+file 
+with \verb|--config DIN2|, but sets the language internally to \verb|de_din2| for
+UCA and do not use the character tables:
+
+\noindent
+\begin{externalDocument}[
+  grfOptions={scale=0.9},%width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.4\linewidth,
+  pages={2},
   frame=false,compiler=lualatex,
   crop,
   xindex,
@@ -799,7 +1117,11 @@
 \end{externalDocument}
 
 
+\clearpage
 
+\subsubsection{Japanese language with UCA}
+
+
 The following runs with \verb|xindex -l jp <file>|:
 
 %  {begin\string{document\string}}%       #2
@@ -814,13 +1136,13 @@
 \edef\FancyVerbStartString{\perCent StartVisiblePreamble}
 \edef\FancyVerbStopString{\perCent StopVisiblePreamble}
 \colorbox{black!20}{\parbox{\linewidth}{%
-\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-12.tex}
 }}
 
 \edef\FancyVerbStartString{\string\begin\string{document\string}}
 \edef\FancyVerbStopString{\string\end\string{document\string}}
 \colorbox{black!10}{\parbox{\linewidth}{%
-\VerbatimInput[fontfamily=helvetica]{Examples/xindex-9.tex}
+\VerbatimInput[fontfamily=helvetica]{Examples/xindex-12.tex}
 }}
 
 %\end{minipage}\hfill
@@ -849,8 +1171,7 @@
 \usepackage{fontspec}
 \setmainfont{SourceHanSans}
 \usepackage[japanese]{babel}
-\addto\captionsjapanese{%
-  \def\indexname{指数}}
+\addto\captionsjapanese{\def\indexname{指数}}
 \usepackage{hvindex}% for \Index
 \usepackage{makeidx}\makeindex
 %StopVisiblePreamble
@@ -865,12 +1186,10 @@
 \makeatother
 \pagestyle{empty}
 \begin{document}
-\Index{車} \Index{車道} 
-日本\index{日本|fbox}  \Index{病院} \Index{コンピュータ} 
-\Index{プリンタ} \Index{印刷}  \Index{スイミングプール} \Index{天王} 
-\Index{広島} \Index{ドイツ} \Index{日本} \Index{ワープロ} 
-\Index{foo} und \Index{bar} \Index{//} \Index{4711}
-\newpage\printindex
+\Index{車} \Index{車道} 日本\index{日本|fbox}  \Index{病院} \Index{コンピュータ} 
+\Index{プリンタ} \Index{印刷}  \Index{スイミングプール} \Index{天王} \Index{広島} 
+\Index{ドイツ} \Index{日本} \Index{ワープロ} 
+\Index{foo} und \Index{bar} \Index{//} \Index{4711}   \newpage\printindex
 \end{document}
 \end{externalDocument}
 %\end{minipage}
@@ -878,72 +1197,8 @@
 
 \setsansfont{Libertinus Sans}\rmfamily
 
-\subsection{Sorting by using UCA (Unicode Collation Algorithm)}
-With the optional argument \verb|-u| or alternatively \verb|--use_UCA| the sorting will be done
-by Michal Hoftich's Lua package \texttt{LUA-UCA}, which should be part of any \TeX{} installation.
 
-The sorting order can be easily modified. Read the documentation of the package \texttt{LUA-UCA}
-on how to do it and what languages are supported so far. Any additional code setting for
-UCA should be done in the file \Lfile{xindex-cfg-uca.lua}, which will automatically be read
-by \Lprog{xindex}.
 
-\iffalse
-\begin{noteblock}
-This package can display, in a 
-\begin{itemize}
-	\item to change dimensions and colors ;
-\end{itemize}
-It's 
-\end{noteblock}
-\fi
-\begin{importantblock}
-If possible, you should use the Unicode sorting by default and only for some special cases
-where you define your own sorting scheme, you should not use the \verb|-u| option.
-\end{importantblock}
-
-
-\begin{externalDocument}[
-%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
-  mpwidth=0.55\linewidth,
-%  pages={6},
-  frame=false,
-  compiler=lualatex,
-  crop,
-  force=false,
-  xindex,
-  xindexOptions=-u -l cs,
-  runs=2,code,docType=latex,
-  showFilename,
-  align=\centering,
-  usefancyvrb,
-%  lstOptions={columns=fixed}
-]{xindex}
-%! lualatex
-\documentclass[paper=a6]{scrartcl}
-\makeatletter
-\def\theindex{%    only for demonstration
-  \section*{\indexname}
-  \parskip\z@ \@plus .3\p@\relax \parindent\z@
-  \let\item\@idxitem}
-\makeatother
-%StartVisiblePreamble
-\usepackage{multicol}
-\usepackage{makeidx}\makeindex
-\def\Index#1{#1\index{#1}}
-%StopVisiblePreamble
-\pagestyle{empty}
-\begin{document}
-Sorted with \verb|-u -l cs|
-\Index{ahoj} \Index{crha}, \Index{čaj}, \Index{chachar}, 
-\Index{rak}, \Index{řeka}, \Index{srp}, \Index{šutr}, 
-\Index{hudba}, \Index{linux}, \Index{zebra}, 
-\Index{žába}, \Index{7 dubů}
-\begin{multicols}{2} \printindex \end{multicols}
-\end{document}
-\end{externalDocument}
-
-
-
 \subsection{Case sensitive index entries}
 By default \textsf{foo} and \textsf{Foo} are two different entries and will handled differently
 by \Lprog{xindex}: \textsf{Foo} will be as an own entry \emph{before} \textsf{foo}. Let's see 
@@ -1000,7 +1255,6 @@
 \end{externalDocument}
 
 
-\clearpage
 
 The same example sorted with the \verb|-a| or \verb|--no_casesensitive| has another output: now
 \verb|xindex-cfg-common.lua| is the first one of the \verb|xindex-???| series.
@@ -1138,7 +1392,6 @@
 
 
 
-\clearpage
 
 \section{Pagenumbers}
 \subsection{Compressing pagenumber series}\label{Compressing}
@@ -1175,7 +1428,6 @@
   pages={6},
   frame=false,
   compiler=lualatex,
-  force=false,
   crop,
   xindex,
   xindexOptions=-l fr,
@@ -1234,7 +1486,6 @@
   frame=false,
   compiler=lualatex,
   crop,
-  force=false,
   xindex,
   xindexOptions=-l de,
   runs=2,code,docType=latex,
@@ -1301,7 +1552,6 @@
 %  xindexOptions=-c description -g, 
   runs=2,
   code,docType=latex,
-  force=false,
  %xindex -c description -n -g xindex-17.idx
  %xindex -c description -n --no_pagenumber gls.idx
 %  runsequence={lualatex,{xindex -c description -n -g},lualatex,lualatex},
@@ -1727,14 +1977,13 @@
 \end{externalDocument}
 
 
+\clearpage
 
-%\clearpage
-
 \section{\texttt{hyperref}}
 
 Using the package \Lpack{hyperref} is no problem:
 
-\enlargethispage{2.5\normalbaselineskip}
+%\enlargethispage{2.5\normalbaselineskip}
 
 \begin{externalDocument}[
 %  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
@@ -1743,6 +1992,7 @@
   frame=false,
   compiler=lualatex,
   crop,
+  force,
   xindex,
   xindexOptions=-l de,
   runs=2,code,docType=latex,
@@ -1767,23 +2017,19 @@
 %StopVisiblePreamble
 \pagestyle{empty}
 \begin{document}
-Sorted with \verb|-l DE|
-\Index{Österreich} \Index{Öresund} 
-\Index{Ostern} \Index{Ober} \Index{Oberin} 
-\Index{Österreich} \index{Öresund|textbf} 
-\Index{Ostern} \Index{Ober} \Index{Oberin} 
-\Index{Obstler} \Index{Öl} \Index{ölen} 
-\Index{Ödem} \Index{Oligarch} \Index{Oder} 
-\Index{oder} \index{Fluss!Oder|textit} 
-\Index{Oder|seealso{Fluss}} \Index{Göbel} 
-\Index{Goethe} \Index{Göthe} \Index{Götz} 
-\newpage\Index{Goldmann} \Index{Goethe}
-\newpage \printindex
+Sorted with \verb|-l DE| \par
+\Index{Österreich} \Index{Öresund} \Index{Ostern} 
+\Index{Ober} \Index{Oberin} \Index{Österreich} 
+\index{Öresund|textbf} \Index{Ostern} \Index{Ober} 
+\Index{Oberin} \Index{Obstler} \Index{Öl} \Index{ölen} 
+\Index{Ödem} \Index{Oligarch} \Index{Oder} \Index{oder} 
+\index{Fluss!Oder|textit} \Index{Oder|seealso{Fluss}} 
+\Index{Göbel} \Index{Goethe} \Index{Göthe} \Index{Götz} 
+\newpage\Index{Goldmann} \Index{Goethe} \newpage \printindex
 \end{document}
 \end{externalDocument}
 
 
-
 The following example fixes a problem with \Lpack{hyperref} and escaping the | character,
 e.g.\verb/"|/. In such a case \Lpack{hyperref} ignores the vertical bar.
 With the optional parameter \verb/-f | --fix_hyperref/, which is still experimental,
@@ -1791,7 +2037,6 @@
 of using this problematic vertical character, you can use \Lcs{textbar}, which also solves the
 problem.
 
-
 \begin{externalDocument}[
 %  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
 %  mpwidth=0.55\linewidth,
@@ -1799,7 +2044,6 @@
   frame=false,
   compiler=lualatex, 
   crop,
-  force=false,
   shellesc,
 %  xindex,
 %  xindexOptions=-,
@@ -1877,7 +2121,6 @@
   pages={2},
   frame=false,
   compiler=lualatex, 
-  force=false,
   crop,
   xindex,
   xindexOptions=-l de,
@@ -1981,7 +2224,6 @@
 %  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
   mpwidth=0.6\linewidth,
   pages={2},
-  force=false,
   frame=false,
   compiler=lualatex,
   crop,
@@ -2127,10 +2369,8 @@
   mpwidth=0.55\linewidth,
   pages={6},
   frame=false,
-  force=false,
   compiler=lualatex, 
   crop,
-  force=false,
 %  xindex,
 %  xindexOptions=-l de,
   runs=2,code,docType=latex,
@@ -2229,9 +2469,57 @@
 \appendix
 \section{Examples}
 
+Correct french sorting with UCA:
+
 \begin{externalDocument}[
 %  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
   mpwidth=0.55\linewidth,
+  pages={3},
+  frame=false,
+  compiler=lualatex, 
+  crop,
+  xindex,
+  xindexOptions=-l fr,
+  runs=2,code,docType=latex,
+  showFilename,
+  align=\centering,
+  grfOptions={width=\linewidth},
+  lstOptions={columns=fixed}]{xindex}
+%! lualatex --shell-escape
+\documentclass[paper=a4,twocolumn]{scrartcl}
+\usepackage{libertinus-otf}
+\let\NewPage\newpage% only for demo
+\makeatletter
+\renewcommand\newpage{\NewPage\let\ps at plain\ps at empty}
+\makeatother
+%StartVisiblePreamble
+\usepackage[french]{babel}
+\usepackage[imakeidx]{xindex} \makeindex
+\newcommand*{\IND}[1]{\index{#1}#1\par}
+%StopVisiblePreamble
+\begin{document}
+%%% xindex -l fr <file>
+\IND{CÔTÉ} \IND{cote} \IND{Côté} \IND{COTÉ} \IND{côte} 
+\IND{COTE} \IND{côté} \IND{Coté} \IND{coté} \IND{Cote} 
+\IND{CÔTE} \IND{Côte} \IND{lésé} \IND{péché} 
+\IND{bohème} \IND{gêné} \IND{pêche} \IND{cæsium} 
+\IND{pêcher} \IND{révèle} \IND{pécher} \IND{révélé} 
+\IND{Bohême} \IND{relève} \IND{PÉCHÉ} \IND{maçon} 
+\IND{relevé} \IND{Élève} \IND{gêne} \IND{élevé} 
+\IND{MÂCON} \IND{gène} \IND{Bohémien} \IND{caennais} 
+\IND{lèse} \IND{coexistence} \IND{cœur} 
+\IND{coefficient} \IND{cafard} \IND{CŒUR} \IND{CÆSIUM}
+\newpage \IND{coté} \IND{cœur} \IND{péché} \newpage
+\IND{coté}\IND{coefficient} \printindex
+\end{document}
+\end{externalDocument}
+
+
+
+
+\begin{externalDocument}[
+%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.55\linewidth,
   pages={2},
   frame=false,
   compiler=lualatex, 

Modified: trunk/Master/texmf-dist/scripts/xindex/xindex.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.55
+ local version = 0.60
 xindex.version = version
 --xindex.self = "xindex"
 
@@ -46,7 +46,7 @@
     -V,--version
     -a,--no_casesensitive
     -b,--no_labels
-    -c,--config (default cfg)
+    -c,--config (default "")
     -e,--escapechar (default ")
     -f,--fix_hyperref
     -g,--no_pagenumber
@@ -57,7 +57,8 @@
     -o,--output (default "")
     -p,--prefix (default L)
     -s,--use_stdin
-    -u,--use_UCA 
+    -u,--use_UCA     no more needed
+    -x,--no_UCA
     <files...> (default stdin) .idx file(s)
 ]]
 
@@ -170,7 +171,6 @@
 
 logFile = io.open(logfilename,"w+")
 require('xindex-lib')
-
 writeLog(2,"xindex v."..version.." (c) Herbert Voß\n",-1)
 writeLog(1,"Verbose level = "..vlevel.."\n",1)
 writeLog(2,"Logfile:"..logfilename.."\n",1)
@@ -202,45 +202,13 @@
 labelPrefix = args.prefix
 writeLog(2,"Label prefix: "..labelPrefix.."\n",-1)
 
-writeLog(2,"Loading common config file ".."xindex-cfg-common\n",1)
+writeLog(2,"Loading all config files ... \n",1) 
+writeLog(2,"Loading common config file ".."xindex-cfg-common\n",1) -- we need config for lang setting
 Config_File_Common = kpse.find_file("xindex-cfg-common.lua") 
 cfg_common = require(Config_File_Common)
 
-local user_config_file = "xindex-"..args["config"]..".lua"
-print("Local config file is: "..user_config_file)
-writeLog(2,"Loading local config file "..user_config_file,0)
-if kpse.find_file(user_config_file) 
-  then Config_File = kpse.find_file(user_config_file) 
-  else print("Cannot find config file with kpse.find_file!!")
-end
-print("\nLocal KPSE config file is: "..Config_File.."\n")
-cfg = require(Config_File)
-writeLog(2," ... done\n",0)
-
--- Create the character list maps for faster sorting
-
-alphabet_lower_map = CreateCharListMap(alphabet_lower)
-alphabet_upper_map = CreateCharListMap(alphabet_upper)
-
-esc_char = args.escapechar
-esc_char2 = esc_char..esc_char  
-writeLog(2,"Escapechar = "..esc_char.."\n",1)
-escape_chars = { -- by default " is the escape char
-  {esc_char2,     '//escaped2//', esc_char    },
-  {esc_char..'@', '//escapedat//',    '@'    },
-  {esc_char..'|', '//escapedvert//',  '|'    },
-  {esc_char..'!', '//escapedexcl//',  '!'    },
-  {'',            '\\textbar',        '|'    },  
-  {'',            '\\braceLeft',      '{'    },  
-  {'',            '\\braceRight',     '}'    }
-}
-
-outFile = io.open(outfilename,"w+")
-
 check_language = args["checklang"]
 local aux_language = ""
-
-
 if check_language then
   print("check aux file for unknown language")
 --  writeLog(2,'Check language in aux file\n',0) 
@@ -287,24 +255,9 @@
   end
 end
 
---print("Sprache:"..language)
+-- next config is UCA
 
-writeLog(2,"Language = "..language.."\n",1) 
-if (indexheader[language] == nil) then
-  writeLog(2,'Corrected the unknown language "'..language..'" to "en"'.."\n",0) 
-  language = "en"
-end  
-
-index_header = indexheader[language]
-if vlevel > 0 then for i=1,#index_header do writeLog(2,index_header[i].."\n",1) end end
-if (folium[language] == nil) then
-  writeLog(2,'Corrected the unknown language "'..language..'" for page folium to "en"'.."\n",0) 
-  page_folium = folium["en"]
-else
-  page_folium = folium[language]
-end  
-
-use_UCA = args["use_UCA"]
+use_UCA = not args["no_UCA"]
 if use_UCA then
   writeLog(1,"Will use LUA-UCA\n",1)
   ducet = require "lua-uca.lua-uca-ducet"
@@ -311,8 +264,8 @@
   collator = require "lua-uca.lua-uca-collator"
   languages = require "lua-uca.lua-uca-languages"
   collator_obj = collator.new(ducet)
-  
-  local uca_config_file = "xindex-cfg-uca.lua"
+
+  uca_config_file = "xindex-cfg-uca.lua"      -- for additional language definition
   writeLog(2,"Loading local UCA config file "..uca_config_file,0)
   UCA_Config_File = kpse.find_file(uca_config_file) 
   uca_cfg = require(UCA_Config_File)
@@ -331,12 +284,67 @@
     print("[Lua-UCA] Loading language: " .. language)
     collator_obj = languages[language](collator_obj)
   end
+  alphabet_lower_map = {}   -- empty tables for UCA sorting
+  alphabet_upper_map = {}
 else
   writeLog(1,"Will _not_ use LUA-UCA\n",1)
+  -- Create the character list maps for faster sorting if not using UCA
+  writeLog(2,"Loading config file for no UCA".."xindex-cfg-no_uca\n",1)
+  Config_File_UCA = kpse.find_file("xindex-cfg-no_uca.lua") 
+  cfg_UCA = require(Config_File_UCA)
+  alphabet_lower_map = CreateCharListMap(alphabet_lower)
+  alphabet_upper_map = CreateCharListMap(alphabet_upper)
 end
 
-upper = unicode.utf8.upper
+-- at last the user config
 
+if args["config"] ~= '""' then
+  local user_config_file = "xindex-"..args["config"]..".lua"
+  print("Local config file is: "..user_config_file)
+  writeLog(2,"Loading local config file "..user_config_file,0)
+  if kpse.find_file(user_config_file) then 
+    Config_File = kpse.find_file(user_config_file) 
+  else 
+    Config_File = ""
+    print("Cannot find config file with kpse.find_file!!")
+  end
+  print("\nLocal KPSE config file is: "..Config_File.."\n")
+  cfg = require(Config_File)
+  writeLog(2," ... done\n",0)
+end
+
+--print("Sprache:"..language)
+
+writeLog(2,"Language = "..language.."\n",1) 
+if (indexheader[language] == nil) then
+  writeLog(2,'Corrected the unknown language "'..language..'" to "en"'.."\n",0) 
+  language = "en"
+end  
+
+index_header = indexheader[language]
+if vlevel > 0 then for i=1,#index_header do writeLog(2,index_header[i].."\n",1) end end
+if (folium[language] == nil) then
+  writeLog(2,'Corrected the unknown language "'..language..'" for page folium to "en"'.."\n",0) 
+  page_folium = folium["en"]
+else
+  page_folium = folium[language]
+end  
+
+
+
+esc_char = args.escapechar
+esc_char2 = esc_char..esc_char  
+writeLog(2,"Escapechar = "..esc_char.."\n",1)
+escape_chars = { -- by default " is the escape char
+  {esc_char2,     '//escaped2//', esc_char    },
+  {esc_char..'@', '//escapedat//',    '@'    },
+  {esc_char..'|', '//escapedvert//',  '|'    },
+  {esc_char..'!', '//escapedexcl//',  '!'    },
+  {'',            '\\textbar',        '|'    },  
+  {'',            '\\braceLeft',      '{'    },  
+  {'',            '\\braceRight',     '}'    }
+}
+
 no_caseSensitive = args["no_casesensitive"]
 if no_caseSensitive then
   writeLog(1,"Sorting will be no case sensitive\n",1)

Modified: trunk/Master/texmf-dist/tex/latex/xindex/xindex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xindex/xindex.sty	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/latex/xindex/xindex.sty	2024-05-17 22:14:29 UTC (rev 71279)
@@ -1,10 +1,10 @@
 %% This is file `xindex.sty',
 %%
-%% Copyright (C) 2018-2023
+%% Copyright (C) 2018-2024
 %% Herbert Voss
 %%
 %% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
+%% conditions of the LaTeX Project Public License, either version 1.3
 %% of this license or (at your option) any later version.
 %% The latest version of this license is in
 %%    http://www.latex-project.org/lppl.txt
@@ -13,7 +13,7 @@
 %
 %
 % -------------------------------------
-\ProvidesPackage{xindex}[2023/07/30 v. 0.55 write into an idx file (hv)]
+\ProvidesPackage{xindex}[2024/05/16 v. 0.60 write into an idx file (hv)]
 %
 \RequirePackage{xkeyval}
 

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-AU.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-AU.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-AU.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-AU'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -16,25 +16,31 @@
       license = "LPPL 1.3"
 }
 
-itemPageDelimiter = ","     -- Hello, 14
-compressPages     = true    -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid
-fCompress	  = true    -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
-minCompress       = 3       -- 14--17 or 
-numericPage       = true    -- for non numerical pagenumbers, like "VI-17"
-sublabels         = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-items  first one is for item
-pageNoPrefixDel   = ""     -- a delimiter for page numbers like "VI-17"
-indexOpening      = ""     -- commands after \begin{theindex}
-rangeSymbol       = "--"
-idxnewletter      = "\\textbf"  -- Only valid if -n is not set
-envStart          = "\\begin{theindex}"  
-envStop           = "\\end{theindex}"
-
-
+--UCA language = "de_din2" -- 
+if use_UCA then
+languages.de = function(collator_obj)
+  local function tailor(a, b, tbl) 
+    local autf = collator_obj:string_to_codepoints(a)
+    local butf = collator_obj:string_to_codepoints(b)
+    collator_obj:tailor(autf,butf, tbl) 
+  end
+  local tailoring = function(s) collator_obj:tailor_string(s) end
+  languages.de(collator_obj)
+  tailoring "&Ö=Oe"
+  tailoring "&ö=oe"
+  tailoring "&Ä=Ae"
+  tailoring "&ä=ae"
+  tailoring "&Ü=Ue"
+  tailoring "&ü=ue"
+  tailoring "&ß=ss"
+  return collator_obj
+end
+end
 --[[
+    Only used for -x option (no UCA):
     Each character's position in this array-like table determines its 'priority'.
     Several characters in the same slot have the same 'priority'.
 ]]
-
 alphabet_lower = { --   for sorting
     { ' ' },  -- only for internal tests
     { 'a', 'á', 'à', 'å', 'æ', },
@@ -100,4 +106,3 @@
     { 'Y', 'Ý', 'Ÿ' },
     { 'Z', 'Ž' }
 }
-

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -11,7 +11,7 @@
 -- configuration for index files of the Heidelberger Akademie der Wissenschaften
 
 if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-RU.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-RU.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-RU.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-RU'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "configuration to xindex.lua",
        author = "Alexey Kuznetzov",
     copyright = "Herbert Voß",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -8,7 +8,7 @@
 -- $Id: xindex-base.lua 22 2022-02-07 12:18:15Z hvoss $
 -----------------------------------------------------------------------
 
-local info = { version = 0.55 } 
+local info = { version = 0.60 } 
 
 -- check config
 if pageNoPrefixDel ~= "" then 
@@ -112,8 +112,14 @@
 
 k = 0
 writeLog(2, "Sort begin\n", 0)
-table.sort(Index,UTFCompare)
+
+if use_UCA then
+  table.sort(Index, UCACompare)
+else
+  table.sort(Index,UTFCompare)
+end
 writeLog(2, "Sort end\n", 0)
+
 if SORTposthook then
   writeLog(2, "PostHook begin\n", 0)
   Index = SORTposthook(Index)
@@ -168,15 +174,19 @@
     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))
+    if v.SortKey ~= nil then
+      codepoints = collator_obj:string_to_codepoints(utf8_upper(v.SortKey))
+    else
+      codepoints = collator_obj:string_to_codepoints(utf8_upper(v.sortChar))
+    end
     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))
+      codepoints = collator_obj:string_to_codepoints(utf8_upper(v.Entry))
       v.sortChar = getSortChar(codepoints)
     end
+--    print("v.sortchar="..v.sortChar)
   end
-  writeLog(2,"done\n",0)
 else
   for i=1, #NewIndex do
     if NewIndex[i]["SortKey"] ~= nil then
@@ -187,6 +197,9 @@
   end
 end
 
+
+writeLog(2,"done\n",0)
+
 if SORTendhook then
   NewIndex = SORTendhook(NewIndex)
 end

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-baselib'] = {
-      version = 0.55,
+      version = 0.60,
       comment = "base library  to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg-common'] = {
-      version = 0.55,
+      version = 0.60,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -16,6 +16,20 @@
       license = "LPPL 1.3"
 }
 
+itemPageDelimiter = ","     -- Hello, 14
+compressPages     = true    -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid
+fCompress         = true    -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
+minCompress       = 3       -- 14--17 or 
+rangeSymbol       = "--"
+numericPage       = true    -- for non numerical pagenumbers, like "VI-17"
+sublabels         = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-items  first one is for item
+pageNoPrefixDel   = ""     -- a delimiter for page numbers like "VI-17"  -- not used !!!
+indexOpening      = ""     -- commands after envStart
+idxnewletter      = "\\textbf"  -- Only valid if -n is not set
+envStart          = "\\begin{theindex}"  
+envStop           = "\\end{theindex}"
+
+
 indexheader = { 
   cs = {"Symboly", "Čísla", "czech"},
   da = {"Symboler", "Tal", "danish"},
@@ -30,6 +44,7 @@
   ru = {"Символы", "Числа", "russian"}, 
 }
 
+
 --[[   babel
 afrikaans
 azerbaijani 

Added: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-no_uca.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-no_uca.lua	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-no_uca.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -0,0 +1,96 @@
+-----------------------------------------------------------------------
+--         FILE:  xindex-cfg.lua
+--  DESCRIPTION:  configuration file for xindex.lua
+-- REQUIREMENTS:  
+--       AUTHOR:  Herbert Voß
+--      LICENSE:  LPPL1.3
+--
+-- $Id: xindex-cfg.lua 22 2022-02-07 12:18:15Z hvoss $
+-----------------------------------------------------------------------
+
+if not modules then modules = { } end modules ['xindex-cfg'] = {
+      version = 0.60,
+      comment = "main configuration to xindex.lua",
+       author = "Herbert Voss",
+    copyright = "Herbert Voss",
+      license = "LPPL 1.3"
+}
+
+itemPageDelimiter = ","     -- Hello, 14
+compressPages     = true    -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid
+fCompress         = true    -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
+minCompress       = 3       -- 14--17 or 
+rangeSymbol       = "--"
+numericPage       = true    -- for non numerical pagenumbers, like "VI-17"
+sublabels         = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-items  first one is for item
+pageNoPrefixDel   = ""     -- a delimiter for page numbers like "VI-17"  -- not used !!!
+indexOpening      = ""     -- commands after envStart
+idxnewletter      = "\\textbf"  -- Only valid if -n is not set
+envStart          = "\\begin{theindex}"  
+envStop           = "\\end{theindex}"
+
+-- The following is not needed for sorting with UCA  !!!!
+
+--[[
+    Each character's position in this array-like table determines its 'priority'.
+    Several characters in the same slot have the same 'priority'.
+]]
+alphabet_lower = { --   for sorting
+    { ' ' },  -- only for internal tests
+    { 'a', 'á', 'à', 'ä', 'â', 'å', 'æ', },
+    { 'b' },
+    { 'c', 'ç' },
+    { 'd' },
+    { 'e', 'é', 'è', 'ë', 'ê' },
+    { 'f' },
+    { 'g' },
+    { 'h' },
+    { 'i', 'í', 'ì', 'î', 'ï' },
+    { 'j' },
+    { 'k' },
+    { 'l' },
+    { 'm' },
+    { 'n', 'ñ' },
+    { 'o', 'ó', 'ò', 'ö', 'ô', 'ø', 'œ', 'ø'},
+    { 'p' },
+    { 'q' },
+    { 'r' },
+    { 's', 'š' },
+    { 'ss', 'ß' },
+    { 't' },
+    { 'u', 'ú', 'ù', 'ü' , 'û'},
+    { 'v' },
+    { 'w' },
+    { 'x' },
+    { 'y', 'ý', 'ÿ' },
+    { 'z', 'ž' }
+}
+alphabet_upper = { -- for sorting
+    { ' ' },
+    { 'A', 'Á', 'À', 'Ä', 'Å', 'Æ', 'Â' },
+    { 'B' },
+    { 'C', 'Ç' },
+    { 'D' },
+    { 'E', 'È', 'É', 'Ë', 'Ê' },
+    { 'F' },
+    { 'G' },
+    { 'H' },
+    { 'I', 'Í', 'Ì', 'Ï', 'Î' },
+    { 'J' },
+    { 'K' },
+    { 'L' },
+    { 'M' },
+    { 'N', 'Ñ' },
+    { 'O', 'Ó', 'Ò', 'Ö', 'Ø','Œ', 'Ø', 'Ô'},
+    { 'P' },
+    { 'Q' },
+    { 'R' },
+    { 'S', 'Š' },
+    { 'T' },
+    { 'U', 'Ú', 'Ù', 'Ü', 'Û' },
+    { 'V' },
+    { 'W' },
+    { 'X' },
+    { 'Y', 'Ý', 'Ÿ' },
+    { 'Z', 'Ž' }
+}


Property changes on: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-no_uca.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
-      version = 0.55,
+      version = 0.60,
       comment = "configuration to xindex-cfg-uca.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -16,6 +16,20 @@
       license = "LPPL 1.3"
 }
 
+languages.fr = function(collator_obj)
+   -- reverse search for accents in French (recommended):
+  collator_obj.accents_backward = true
+  -- accents: sorting order in French
+  local tailoring = function(s) collator_obj:tailor_string(s) end
+  tailoring("&æ=ae")
+  tailoring("&œ=oe")
+  tailoring("&th<þ<<<Þ")       -- Canadian, see SGQRI004.pdf
+  -- lowercase before uppercase in French
+  --collator_obj:uppercase_first()
+  return collator_obj
+end 
+
+
 -- put any additional code for lua-uca here ---
 languages.no = function(collator_obj)
   local tailoring = function(s) collator_obj:tailor_string(s) end
@@ -50,4 +64,4 @@
 <<<< 	か<<<<カ  	Identifies a quaternary difference between "か" and "カ". (New in ICU 53.) ICU permits up to three quaternary relations in a row (except for intervening "=" identity relations).
 = 	x = y 	Signifies no difference between "x" and "y".
 & 	&Z 	Instructs ICU to reset at this letter. These rules will be relative to this letter from here on, but will not affect the position of Z itself. 
-]]
\ No newline at end of file
+]]

Deleted: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -1,94 +0,0 @@
------------------------------------------------------------------------
---         FILE:  xindex-cfg.lua
---  DESCRIPTION:  configuration file for xindex.lua
--- REQUIREMENTS:  
---       AUTHOR:  Herbert Voß
---      LICENSE:  LPPL1.3
---
--- $Id: xindex-cfg.lua 22 2022-02-07 12:18:15Z hvoss $
------------------------------------------------------------------------
-
-if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.55,
-      comment = "main configuration to xindex.lua",
-       author = "Herbert Voss",
-    copyright = "Herbert Voss",
-      license = "LPPL 1.3"
-}
-
-itemPageDelimiter = ","     -- Hello, 14
-compressPages     = true    -- something like 12--15, instead of 12,13,14,15. the |( ... |) syntax is still valid
-fCompress	  = true    -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
-minCompress       = 3       -- 14--17 or 
-rangeSymbol       = "--"
-numericPage       = true    -- for non numerical pagenumbers, like "VI-17"
-sublabels         = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-items  first one is for item
-pageNoPrefixDel   = ""     -- a delimiter for page numbers like "VI-17"  -- not used !!!
-indexOpening      = ""     -- commands after envStart
-idxnewletter      = "\\textbf"  -- Only valid if -n is not set
-envStart          = "\\begin{theindex}"  
-envStop           = "\\end{theindex}"
-
---[[
-    Each character's position in this array-like table determines its 'priority'.
-    Several characters in the same slot have the same 'priority'.
-]]
-alphabet_lower = { --   for sorting
-    { ' ' },  -- only for internal tests
-    { 'a', 'á', 'à', 'ä', 'â', 'å', 'æ', },
-    { 'b' },
-    { 'c', 'ç' },
-    { 'd' },
-    { 'e', 'é', 'è', 'ë', 'ê' },
-    { 'f' },
-    { 'g' },
-    { 'h' },
-    { 'i', 'í', 'ì', 'î', 'ï' },
-    { 'j' },
-    { 'k' },
-    { 'l' },
-    { 'm' },
-    { 'n', 'ñ' },
-    { 'o', 'ó', 'ò', 'ö', 'ô', 'ø', 'œ', 'ø'},
-    { 'p' },
-    { 'q' },
-    { 'r' },
-    { 's', 'š' },
-    { 'ss', 'ß' },
-    { 't' },
-    { 'u', 'ú', 'ù', 'ü' , 'û'},
-    { 'v' },
-    { 'w' },
-    { 'x' },
-    { 'y', 'ý', 'ÿ' },
-    { 'z', 'ž' }
-}
-alphabet_upper = { -- for sorting
-    { ' ' },
-    { 'A', 'Á', 'À', 'Ä', 'Å', 'Æ', 'Â' },
-    { 'B' },
-    { 'C', 'Ç' },
-    { 'D' },
-    { 'E', 'È', 'É', 'Ë', 'Ê' },
-    { 'F' },
-    { 'G' },
-    { 'H' },
-    { 'I', 'Í', 'Ì', 'Ï', 'Î' },
-    { 'J' },
-    { 'K' },
-    { 'L' },
-    { 'M' },
-    { 'N', 'Ñ' },
-    { 'O', 'Ó', 'Ò', 'Ö', 'Ø','Œ', 'Ø', 'Ô'},
-    { 'P' },
-    { 'Q' },
-    { 'R' },
-    { 'S', 'Š' },
-    { 'T' },
-    { 'U', 'Ú', 'Ù', 'Ü', 'Û' },
-    { 'V' },
-    { 'W' },
-    { 'X' },
-    { 'Y', 'Ý', 'Ÿ' },
-    { 'Z', 'Ž' }
-}

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-danteedition.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-danteedition.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-danteedition.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "configuration file for the DANTE Edition",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -91,3 +91,18 @@
     { 'Y', 'Ý', 'Ÿ' },
     { 'Z', 'Ž' }
 }
+
+folium = { 
+  cs = {"f.", "ff."},
+  da = {"f", "ff"},
+  de = {"f", "ff"},
+  en = {"f", "ff"},
+  es = {"f", "ff"},
+  fr = {"\\,sq.","\\,sqq."},
+  it = {"f", "ff"},
+  jp = {"シンボル","番号"},
+  nl = {"f.", "ff."},
+  no = {"\\,f.","\\,ff."},
+  ru = {"",""},       -- doesn't exist
+}
+

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "DTK configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-lib'] = {
-      version = 0.55,
+      version = 0.60,
       comment = "main library  to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -16,6 +16,10 @@
       license = "LPPL 1.3"
 }
 
+require ("unicode")
+utf8_lower = unicode.utf8.lower
+utf8_upper = unicode.utf8.upper
+
 local escapechar1 = "\""
 local escapechar2 = "\"\""
 local Letters = "ÄÖÜäöüabcdefghijklmnopqrstuvwxyzßABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -55,29 +59,37 @@
 end
 
 function NormalizedLower(strOrig)  -- return normalized UTF string.lower (ä -> a)
-  local str = ""
-  for i=1, utf.len(strOrig) do
-    local c = get_normalized_char(alphabet_lower_map,utf.sub(strOrig,i,i))
-    str = str..string.lower(c)
+  if use_UCA then 
+    return strOrig
+  else
+    local str = ""
+    for i=1, utf.len(strOrig) do
+      local c = get_normalized_char(alphabet_lower_map,utf.sub(strOrig,i,i))
+      str = str..string.lower(c)
+    end
+    return str
   end
-  return str
 end
 
 function NormalizedUpper(strOrig)  -- return normalized UTF string.upper (ä -> A)
-  local str = {}
-  local c
-  for i=1, utf.len(strOrig) do
-    c = get_normalized_char(alphabet_lower_map,utf.sub(strOrig,i,i))
-    str[#str + 1] = c
+  if use_UCA then
+    return strOrig
+  else
+    local str = {}
+    local c
+    for i=1, utf.len(strOrig) do
+      c = get_normalized_char(alphabet_lower_map,utf.sub(strOrig,i,i))
+      str[#str + 1] = c
+    end
+    strOrig = table.concat(str)
+    str = {}
+    for i=1, utf.len(strOrig) do
+      c = get_normalized_char(alphabet_upper_map,utf.sub(strOrig,i,i))
+      c = NormalizedUppercase(c)
+      str[#str + 1] = c
+    end
+    return table.concat(str)
   end
-  strOrig = table.concat(str)
-  str = {}
-  for i=1, utf.len(strOrig) do
-    c = get_normalized_char(alphabet_upper_map,utf.sub(strOrig,i,i))
-    c = NormalizedUppercase(c)
-    str[#str + 1] = c
-  end
-  return table.concat(str)
 end
 
 function NormalizedUppercase(chr)  -- return normalized UTF uppercase letter
@@ -574,6 +586,7 @@
   end
 --  s:gsub("%s+", "")  strip spaces
   --  a["SortKey"] = a["SortKey"]:gsub("%s+", "")
+  --print("Sortkey: " .. a["SortKey"])
   if not use_UCA then           -- test if it is a symbol after 9 and before A or after Z
     if (a["SortKey"]:byte() > 57 and a["SortKey"]:byte() < 65) or 
        (a["SortKey"]:byte() > 90 and a["SortKey"]:byte() < 97) or
@@ -581,29 +594,36 @@
       a["SortKey"] = "/"..a["SortKey"]     -- sort it after /
     end
   end   
-  --print("Sortkey: " .. a["SortKey"])
 end
 
 function GenerateSortKeys(Index)
-  for _, entry in ipairs(Index) do
+    for _, entry in ipairs(Index) do
 --    print("<<".._..entry["Entry"])
-    GenerateSortKey(entry)
+      GenerateSortKey(entry)
+    end
+end
+
+function UCACompare(a,b)
+  if ignoreSpace then
+    A = a["Entry"]:gsub("%s+", "")  -- str = str:gsub("%s+", "")
+    B = b["Entry"]:gsub("%s+", "")
+  else
+    A = a["Entry"]
+    B = b["Entry"]
   end
+  --print(A,B)
+  compare = collator_obj:compare_strings(A,B)
+  writeLog(1,"UCACompare: "..A.."<"..B.." : "..tostring(compare).."\n",2)
+  return compare
 end
 
 function UTFCompare(a,b)
   local A = a["SortKey"]
   local B = b["SortKey"]
-  if use_UCA then
-    compare = collator_obj:compare_strings(A,B)
-  else
-    compare = A<B
-  end
-  writeLog(1,"UTFCompare: "..A.."<"..B.." : "..tostring(compare).."\n",2)
-  return compare
+  writeLog(1,"UTFCompare: "..A.."<"..B.." : "..tostring(A<B).."\n",2)
+  return A<B
 end
 
-
 function pageCompare(a,b)  -- a = {{number=...,special=..},{...,...}}
 -- a["number"], b["number"] are something like "3" or "VI-17" or "9--31"
   writeLog(1,"pageCompare: "..a["number"].."  "..b["number"].."\n",2) 
@@ -1018,7 +1038,7 @@
     local sort_char = utf8.char(table.unpack(codes))
     --print("SortChar:"..sort_char)
     -- print unicode category of the first char
-    return upper(sort_char) -- use unicode.utf8.upper to make the char uppercase
+    return unicode.utf8.upper(sort_char) -- use unicode.utf8.upper to make the char uppercase
   end
 end
 

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -10,7 +10,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-no'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-pretty'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "dump a Lua table for debugging",
        author = "Steve Donovan",
     copyright = "Steve Donovan",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua	2024-05-17 22:14:06 UTC (rev 71278)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua	2024-05-17 22:14:29 UTC (rev 71279)
@@ -9,7 +9,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-yannis'] = {
-      version = 0.55,
+      version = 0.58,
       comment = "main configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",



More information about the tex-live-commits mailing list.