texlive[55361] trunk: xindex (31may20)

commits+karl at tug.org commits+karl at tug.org
Sun May 31 23:10:45 CEST 2020


Revision: 55361
          http://tug.org/svn/texlive?view=revision&revision=55361
Author:   karl
Date:     2020-05-31 23:10:45 +0200 (Sun, 31 May 2020)
Log Message:
-----------
xindex (31may20)

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/tests/HADW.ind
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf
    trunk/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh
    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/lualatex/xindex/xindex-DIN2.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua

Modified: trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -8,7 +8,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.21
+ local version = 0.22
 xindex.version = version
 --xindex.self = "xindex"
 
@@ -174,13 +174,21 @@
   {esc_char..')', '//escapedparenright//',')'    }
 }
 
-language = string.lower(args["language"])
+language = string.lower(args["language"]):sub(1, 2)
 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
-page_folium = folium[language]
+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  
 
-
 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	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG	2020-05-31 21:10:45 UTC (rev 55361)
@@ -1,3 +1,5 @@
+0.22  2020-05-30 - added test for correct language with a fallback to english (en)
+                   and also allow de_DE, where only the first two letters are used
 0.21  2020-05-29 - added support for italian language
 0.20  2019-11-22 - fix for |see{foo bar}
 0.19  2019-10-31 - add again missing accented characters

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.ind
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.ind	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.ind	2020-05-31 21:10:45 UTC (rev 55361)
@@ -0,0 +1,38 @@
+
+\begin{theindex}
+
+\indexspace
+\textbf{A}\label{L-xindex-A}
+\nopagebreak[4]
+  \item Aachen, Johannes von \dotfill  {\colorbox{black!15}{VII/1}:~215}
+  \item Aarones \dotfill  {\colorbox{black!15}{VII/2/1}:~1003}, {1012}
+  \item Abrahamson \dotfill  {\colorbox{black!15}{VII/2/1}:~864}, {991}, {1048}, {1067}, {1156}
+  \item Adamson \dotfill  {\colorbox{black!15}{VII/2/1}:~1223}, {\colorbox{black!15}{IX/1}:~1228}
+  \item Adrian
+    \subitem -\,Hauster \dotfill  {\colorbox{black!15}{VII/1}:~514}, {\colorbox{black!15}{XI/1}:~515}
+  \item Alting
+    \subitem -\,Mensa \dotfill  {\colorbox{black!15}{VII/1}:~426}, {434}, {453}, {455}, {466f.}
+
+\indexspace
+\textbf{B}\label{L-xindex-B}
+\nopagebreak[4]
+  \item Bremen
+    \subitem -\,Heinz von, Erzbischof \dotfill  \see{Sachsen-Lauenburg}{ }
+
+\indexspace
+\textbf{O}\label{L-xindex-O}
+\nopagebreak[4]
+  \item Osnabrück
+    \subitem -\,Heinz  von, Bischof \dotfill  \see{Sachsen-Lauenburg}{ }
+
+\indexspace
+\textbf{S}\label{L-xindex-S}
+\nopagebreak[4]
+  \item Schleswig-Holstein
+    \subitem -\,Rudolf von, Herzog \dotfill  {\colorbox{black!15}{VII/2/1}:~758--761}, {765}
+
+\indexspace
+\textbf{Z}\label{L-xindex-Z}
+\nopagebreak[4]
+  \item Zwingl, Haldrich \dotfill  {\colorbox{black!15}{IX}:~479}, {692}
+\end{theindex}

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW.tex	2020-05-31 21:10:45 UTC (rev 55361)
@@ -1,10 +1,10 @@
 \documentclass[paper=a4,parskip=half-,ngerman,DIV=13]{scrartcl}
 \usepackage{eurosym}
 \usepackage[silent]{fontspec}
-\usepackage{libertinus-otf}
+\usepackage[nomath]{libertinus-otf}
 \usepackage{babel}
 \usepackage{makeidx}
-\usepackage{dtk-logos}
+\usepackage{dtk-logos,xcolor}
 \makeatletter
 \def\theindex{%    only for demonstration
   \section*{\indexname}

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/HADW2.ind	2020-05-31 21:10:45 UTC (rev 55361)
@@ -2,67 +2,63 @@
 \begin{theindex}
 
 \indexspace
-\textbf{K}
+\textbf{A}\label{L-xindex-A}
 \nopagebreak[4]
-  \item  Karl II, {VII/1 147}
-  \item  Karl III, {VII/1 149}
-  \item  Karl IV, {VII/1 147}, {34}
-  \item  Karl V, {VII/1 34}
-  \item  Karl VI, {VII/1 296}
-  \item  Karl IX, {VII/1 296}
-  \item  Karl X, {VII/1 149}
-
-\indexspace
-\textbf{A}
-\nopagebreak[4]
-  \item Aachen, Johannes von, {VII/1 215}
-  \item Aarones, {VII/2/1 1003}, {1012}
-  \item Abrahamson, {VII/2/1 1048}, {1067}, {1156}, {864}, {991}
-  \item Adamson, {VII/2/1 1223}, {IX/1 1228}
+  \item Aachen, Johannes von \dotfill  {\colorbox{black!15}{VII/1}:~215}
+  \item Aarones \dotfill  {\colorbox{black!15}{VII/2/1}:~1003}, {1012}
+  \item Abrahamson \dotfill  {\colorbox{black!15}{VII/2/1}:~864}, {991}, {1048}, {1067}, {1156}
+  \item Adamson \dotfill  {\colorbox{black!15}{VII/2/1}:~1223}, {\colorbox{black!15}{IX/1}:~1228}
   \item Adrian
-    \subitem -\,Hauster, {VII/1 514}, {XI/1 515}
+    \subitem -\,Hauster \dotfill  {\colorbox{black!15}{VII/1}:~514}, {\colorbox{black!15}{XI/1}:~515}
   \item Alting
-    \subitem -\,Mensa, {VII/1 426}, {434}, {453}, {455}, {466f}
+    \subitem -\,Mensa \dotfill  {\colorbox{black!15}{VII/1}:~426}, {434}, {453}, {455}, {466f.}
 
 \indexspace
-\textbf{B}
+\textbf{B}\label{L-xindex-B}
 \nopagebreak[4]
   \item Bremen
-    \subitem -\,Heinz von, Erzbischof, \see{Sachsen-Lauenburg}{}
+    \subitem -\,Heinz von, Erzbischof \dotfill  \see{Sachsen-Lauenburg}{ }
 
 \indexspace
-\textbf{J}
+\textbf{J}\label{L-xindex-J}
 \nopagebreak[4]
   \item Julian
-    \subitem -\,Apostata, römischer Kaiser, {VII/2/1 904}
-  \item Justinian I., byzantinischer Kaiser, {VII/1 326}, {734}, {VII/2/1 1011}
+    \subitem -\,Apostata, römischer Kaiser \dotfill  {\colorbox{black!15}{VII/2/1}:~904}
+  \item Justinian I., byzantinischer Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~326}, {734}, {\colorbox{black!15}{VII/2/1}:~1011}
 
 \indexspace
-\textbf{K}
+\textbf{K}\label{L-xindex-K}
 \nopagebreak[4]
   \item Karl
-    \subitem -\,II., Kaiser, {VII/1 147}
-    \subitem -\,III., Kaiser, {VII/1 149}
-    \subitem -\,IV., Kaiser, {VII/1 147}, {34}
-    \subitem -\,IX., Kaiser, {VII/1 296}
-    \subitem -\,V., Kaiser, {VII/1 34}
-    \subitem -\,VI., Kaiser, {VII/1 296}
-    \subitem -\,X., Kaiser, {VII/1 149}
+    \subitem -\,II., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~147}
+    \subitem -\,III., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~149}
+    \subitem -\,IV., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~147}, {147}
+    \subitem -\,V., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~34}
+    \subitem -\,VI., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~296}
+    \subitem -\,IX., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~296}
+    \subitem -\,X., Kaiser \dotfill  {\colorbox{black!15}{VII/1}:~149}
+  \item Karl II \dotfill  {\colorbox{black!15}{VII/1}:~147}
+  \item Karl III \dotfill  {\colorbox{black!15}{VII/1}:~149}
+  \item Karl IV \dotfill  {\colorbox{black!15}{VII/1}:~147}, {147}
+  \item Karl V \dotfill  {\colorbox{black!15}{VII/1}:~34}
+  \item Karl VI \dotfill  {\colorbox{black!15}{VII/1}:~296}
+  \item Karl IX \dotfill  {\colorbox{black!15}{VII/1}:~296}
+  \item Karl X \dotfill  {\colorbox{black!15}{VII/1}:~149}
 
 \indexspace
-\textbf{O}
+\textbf{O}\label{L-xindex-O}
 \nopagebreak[4]
   \item Osnabrück
-    \subitem -\,Heinz  von, Bischof, \see{Sachsen-Lauenburg}{}
+    \subitem -\,Heinz  von, Bischof \dotfill  \see{Sachsen-Lauenburg}{ }
 
 \indexspace
-\textbf{S}
+\textbf{S}\label{L-xindex-S}
 \nopagebreak[4]
   \item Schleswig-Holstein
-    \subitem -\,Rudolf von, Herzog, {VII/2/1 758--761}, {765}
+    \subitem -\,Rudolf von, Herzog \dotfill  {\colorbox{black!15}{VII/2/1}:~758--761}, {765}
 
 \indexspace
-\textbf{Z}
+\textbf{Z}\label{L-xindex-Z}
 \nopagebreak[4]
-  \item Zwingl, Haldrich, {IX 479}, {692}
+  \item Zwingl, Haldrich \dotfill  {\colorbox{black!15}{IX}:~479}, {692}
 \end{theindex}

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/Umlaute2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/buch.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo-hyperref.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/demo3.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/tests/runTests.sh	2020-05-31 21:10:45 UTC (rev 55361)
@@ -21,9 +21,13 @@
 lualatex demo-hyperref > /dev/null
 
 echo "HADW"
-xindex -l de -c HAdW HADW > /dev/null
+xindex -l de -c HAdW-eKO HADW > /dev/null
 lualatex HADW > /dev/null
+lualatex HADW > /dev/null
 
+echo "HADW2"
+xindex -l de --config HAdW-eKO HADW2 > /dev/null
+
 echo "Umlaute"
 xindex -l de Umlaute  > /dev/null
 lualatex Umlaute > /dev/null

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	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex	2020-05-31 21:10:45 UTC (rev 55361)
@@ -80,7 +80,7 @@
 \def\setVersion#1{\setVVersion#1!!}
 \def\setVVersion#1=#2!!{\def\xIndexVersion{#2}} 
 
-\setVersion{version = 0.21}%  can be autimatically changed by perl
+\setVersion{version = 0.22}%  can be automatically changed by perl
 
 \setkeys{dtk}{cleanup=true,force=false}
 

Modified: trunk/Master/texmf-dist/scripts/xindex/xindex.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -8,7 +8,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.21
+ local version = 0.22
 xindex.version = version
 --xindex.self = "xindex"
 
@@ -174,13 +174,21 @@
   {esc_char..')', '//escapedparenright//',')'    }
 }
 
-language = string.lower(args["language"])
+language = string.lower(args["language"]):sub(1, 2)
 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
-page_folium = folium[language]
+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  
 
-
 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/lualatex/xindex/xindex-DIN2.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -9,7 +9,7 @@
 -- configuration for index files of the Heidelberger Akademie der Wissenschaften
 
 if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -6,7 +6,7 @@
 --      LICENSE:  LPPL1.3
 -----------------------------------------------------------------------
 
-local info = { version = 0.21 } 
+local info = { version = 0.22 } 
 
 -- check config
 if pageNoPrefixDel ~= "" then 

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg-common'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -15,6 +15,7 @@
 }
 
 indexheader = { 
+  cs = {"Symboly", "Čísla"},
   de = {"Symbole", "Zahlen"},
   en = {"Symbols", "Numbers"},
   fr = {"Symboles","Chiffre"},
@@ -23,12 +24,13 @@
 }
 
 folium = { 
+  cs = {"f.", "ff."},
   de = {"f", "ff"},
   en = {"f", "ff"},
   fr = {"\\,sq","\\,sqq"},
   it = {"f", "ff"},
+  jp = {"シンボル","番号"},
   no = {"\\,f.","\\,ff."},
-  jp = {"シンボル","番号"},
 }
 
 alphabet_uppercase = {

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "main configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "DTK configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -28,7 +28,7 @@
 --~ n       2
 --------------------------------
 if not modules then modules = { } end modules ['xindex-lapp'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "read parameter for xindex.lua",
        author = "Steve Donovan",
     copyright = "Steve Donovan",

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-lib'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "main library  to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",

Added: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -0,0 +1,155 @@
+-----------------------------------------------------------------------
+--         FILE:  xindex-norsk.lua
+--  DESCRIPTION:  configuration file for xindex.lua
+-- REQUIREMENTS:  
+--       AUTHOR:  Herbert Voß
+--     MODIFIED:  Sveinung Heggen (2020-01-02)
+--      LICENSE:  LPPL1.3
+-----------------------------------------------------------------------
+
+if not modules then modules = { } end modules ['xindex-norsk'] = {
+      version = 0.22,
+      comment = "configuration to xindex.lua",
+       author = "Herbert Voss",
+    copyright = "Herbert Voss",
+      license = "LPPL 1.3"
+}
+
+local ducet = require "lua-uca.lua-uca-ducet"
+local collator = require "lua-uca.lua-uca-collator"
+local languages = require "lua-uca.lua-uca-languages"
+local collator_obj = collator.new(ducet)
+
+local language = "en" -- default language
+-- language name specified on the command line doesn't seem to be available
+-- in the config file, so we just try to find it ourselves
+for i, a in ipairs(arg) do
+  if a == "-l" or a=="--language" then
+    language = arg[i+1]
+    break
+  end
+end
+
+if languages[language] then
+  print("[Lua-UCA] Loading language: " .. language)
+  collator_obj = languages[language](collator_obj)
+end
+
+local upper = unicode.utf8.upper
+
+escape_chars = { -- by default " is the escape char
+  {'""', "\\escapedquote",      '\"{}' },
+  {'"@', "\\escapedat",         "@"    },
+  {'"|', "\\escapedvert",       "|"    },
+  {'"!', "\\escapedexcl",       "!"    },
+  {'"(', "\\escapedparenleft",  "("   },
+  {'")', "\\escapedparenright", ")"  }
+}
+
+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 page numbers, 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
+
+folium = { 
+  de = {"f.", "ff."},
+  en = {"f.", "ff."},
+  fr = {"\\,sq","\\,sqq"},
+  no = {"\\,f.","\\,ff."},
+  cs = {"f.", "ff."},
+} 
+
+indexheader = { 
+  de = {"Symbole", "Zahlen"},
+  en = {"Symbols", "Numbers"},
+  fr = {"Symboles","Chiffre"},
+  jp = {"シンボル","番号"},
+  cs = {"Symboly", "Čísla"}
+}
+
+
+-- get Unicode category of the codepoint, if supported
+function getCategory(codepoints)
+  local codepoint = codepoints[1]
+  local category = get_category(codepoint)
+  if category == "Nd" then 
+    return "digits"
+  elseif category:match("^L") then
+    local block =  binary_range_search(codepoint, unicode_blocks) or {}
+    return block[3] or "other"
+  end
+  return "other"
+end
+
+-- insert the index entry to the categories subtable
+function categorize(codepoints, entry, categories)
+  local subcategories = categories.categories
+  -- return category name from the Unicode block of the first character
+  local category = getCategory(codepoints)
+  -- if the categories doesn't use this code block, categorize it as other
+  local used = subcategories[category] and category or "other"
+  table.insert(subcategories[used], entry)
+end
+
+-- convert categories back to index list
+function uncategorize(ordering_categories)
+  local newlist = {}
+  -- make new index order based on defined categories
+  for _, category in ipairs(ordering_categories.order) do
+    for _,entry in ipairs(ordering_categories.categories[category]) do
+      newlist[#newlist+1] = entry
+    end
+  end
+  return newlist
+end
+
+
+function UTFCompare(a,b)
+  local A = a["SortKey"]
+  local B = b["SortKey"]
+  return collator_obj:compare_strings(A,B)
+end
+
+function getSortChar(codepoints)
+  if #codepoints > 0 then 
+    local codes, pos = collator_obj:get_lowest_char(codepoints, 1)
+    if not codes then 
+      -- if the first character in the sort key doesn't return letter
+      -- continue until we find some
+      table.remove(codepoints, 1)
+      return getSortChar(codepoints)
+    end
+    local sort_char = utf8.char(table.unpack(codes))
+    -- print unicode category of the first char
+    return upper(sort_char) -- use unicode.utf8.upper to make the char uppercase
+  end
+end
+
+function SORTendhook(list)
+  -- get the headers for letter groups
+  for i=1, #list do
+    v = list[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
+  return list
+end
+
+-- We use Lua-UCA methods for sorting and determining first characters, so
+-- alphabet list is obsolete
+
+alphabet_lower = { }
+alphabet_upper = { }


Property changes on: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2020-05-31 21:10:21 UTC (rev 55360)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2020-05-31 21:10:45 UTC (rev 55361)
@@ -5,7 +5,7 @@
 --
 
 if not modules then modules = { } end modules ['xindex-pretty'] = {
-      version = 0.21,
+      version = 0.22,
       comment = "dump a Lua table for debugging",
        author = "Steve Donovan",
     copyright = "Steve Donovan",



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