texlive[51330] trunk: xindex (6jun19)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 6 23:48:49 CEST 2019


Revision: 51330
          http://tug.org/svn/texlive?view=revision&revision=51330
Author:   karl
Date:     2019-06-06 23:48:48 +0200 (Thu, 06 Jun 2019)
Log Message:
-----------
xindex (6jun19)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
    trunk/Master/texmf-dist/doc/lualatex/xindex/Makefile
    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

Modified: trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -8,7 +8,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.10
+ local version = 0.12
 xindex.version = version
 --xindex.self = "xindex"
 

Modified: trunk/Master/texmf-dist/doc/lualatex/xindex/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/xindex/Makefile	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/Makefile	2019-06-06 21:48:48 UTC (rev 51330)
@@ -21,7 +21,7 @@
 #	if ! test -f $(MAIN).glo ; then touch $(MAIN).glo; fi
 	if ! test -f $(MAIN).idx ; then touch $(MAIN).idx; fi
 #	makeindex -s gglo.ist -t $(MAIN).glg -o $(MAIN).gls $(MAIN).glo
-	xindex $(MAIN).idx
+	xindex -a $(MAIN).idx
 #	bibtex $(MAIN)
 	$(LATEX) --shell-escape $(MAIN)
 #	$(LATEX) --shell-escape $(MAIN)

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	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex	2019-06-06 21:48:48 UTC (rev 51330)
@@ -148,7 +148,8 @@
     [-v ]                                 verbose
     [-c,--config ]                        default is cfg
     [-e,--escapechar ]                    default is " 
-    [-n,--noheadings ]                    
+    [-a, --nocasesensitive ]              default is false
+    [-n,--noheadings ]                    default is false
     [-o,--output ]                        default is <input>.ind
     [-l,--language ]                      default is en 
     <input file> 
@@ -1217,6 +1218,119 @@
 \end{document}
 \end{externalDocument}
 
+
+\section{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 
+a more complex example. In the index the entry \verb|xindex-DIN2.lua| is the first one of
+the \verb|xindex-???| series because uppercase letters are sorted before lowercase letters.
+
+\begin{externalDocument}[
+%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.55\linewidth,
+  pages={2},
+  frame=false,
+  compiler=lualatex --shell-escape, 
+  crop,
+  xindex,
+%  xindexOptions=,
+  force,
+  runs=2,code,docType=latex,
+  showFilename,
+  align=\centering,
+  lstOptions={columns=fixed}]{xindex}
+\documentclass{scrartcl}
+\usepackage{libertinus-otf}
+\makeatletter
+\def\theindex{%    only for demonstration
+  \section*{\indexname}
+  \parskip\z@ \@plus .3\p@\relax \parindent\z@
+  \let\item\@idxitem}
+\makeatother
+\usepackage{filecontents}
+\begin{filecontents*}{\jobname.idx}
+\indexentry{xindex package@\texttt  {xindex} package|hyperpage}{2}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{4}
+\indexentry{xindex-cfg.lua file@\texttt  {xindex-cfg.lua} file|hyperpage}{6}
+\indexentry{xindex-newfile.lua file@\texttt  {xindex-newfile.lua} file|hyperpage}{6}
+\indexentry{xindex-DIN2.lua file@\texttt  {xindex-DIN2.lua} file|hyperpage}{6}
+\indexentry{xindex-cfg-common.cfg file@\texttt  {xindex-cfg-common.cfg} file|hyperpage}{9}
+\indexentry{xindex-cfg.lua file@\texttt  {xindex-cfg.lua} file|hyperpage}{10}
+\indexentry{xindex-HAdW-eKO.lua file@\texttt  {xindex-HAdW-eKO.lua} file|hyperpage}{10}
+\indexentry{xindex-dtk.lua file@\texttt  {xindex-dtk.lua} file|hyperpage}{12}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{13}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{14}
+\indexentry{xindex-cfg-common.lua file@\texttt  {xindex-cfg-common.lua} file|hyperpage}{14}
+\indexentry{xindex package@\texttt  {xindex} package|hyperpage}{15}
+\end{filecontents*}
+%StartVisiblePreamble
+\usepackage{makeidx}
+\usepackage{hyperref}
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+foo\newpage
+\printindex
+\end{document}
+\end{externalDocument}
+
+
+The same example sorted with the \verb|-a| or \verb|--nocasesensitive| has another output: now
+\verb|xindex-cfg-common.lua| is the first one of the \verb|xindex-???| series.
+
+
+\begin{externalDocument}[
+%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+  mpwidth=0.55\linewidth,
+  pages={2},
+  frame=false,
+  compiler=lualatex --shell-escape, 
+  crop,
+  xindex,
+  xindexOptions=-a,
+  force,
+  runs=2,code,docType=latex,
+  showFilename,
+  align=\centering,
+  lstOptions={columns=fixed}]{xindex}
+\documentclass{scrartcl}
+\usepackage{libertinus-otf}
+\makeatletter
+\def\theindex{%    only for demonstration
+  \section*{\indexname}
+  \parskip\z@ \@plus .3\p@\relax \parindent\z@
+  \let\item\@idxitem}
+\makeatother
+\usepackage{filecontents}
+\begin{filecontents*}{\jobname.idx}
+\indexentry{xindex package@\texttt  {xindex} package|hyperpage}{2}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{4}
+\indexentry{xindex-cfg.lua file@\texttt  {xindex-cfg.lua} file|hyperpage}{6}
+\indexentry{xindex-newfile.lua file@\texttt  {xindex-newfile.lua} file|hyperpage}{6}
+\indexentry{xindex-DIN2.lua file@\texttt  {xindex-DIN2.lua} file|hyperpage}{6}
+\indexentry{xindex-cfg-common.cfg file@\texttt  {xindex-cfg-common.cfg} file|hyperpage}{9}
+\indexentry{xindex-cfg.lua file@\texttt  {xindex-cfg.lua} file|hyperpage}{10}
+\indexentry{xindex-HAdW-eKO.lua file@\texttt  {xindex-HAdW-eKO.lua} file|hyperpage}{10}
+\indexentry{xindex-dtk.lua file@\texttt  {xindex-dtk.lua} file|hyperpage}{12}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{13}
+\indexentry{xindex program@\texttt  {xindex} program|hyperpage}{14}
+\indexentry{xindex-cfg-common.lua file@\texttt  {xindex-cfg-common.lua} file|hyperpage}{14}
+\indexentry{xindex package@\texttt  {xindex} package|hyperpage}{15}
+\end{filecontents*}
+%StartVisiblePreamble
+\usepackage{makeidx}
+\usepackage{hyperref}
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+foo\newpage
+\printindex
+\end{document}
+\end{externalDocument}
+
+
+
+
 \section{Automatic index creation}
 With package \Lpack{xindex} one can define several different index files, e.\,g.
 an \Index{index of names}. With the optional argument \Loption{imakeidx} the package itself loads  \Lpack{imakeidx}

Modified: trunk/Master/texmf-dist/scripts/xindex/xindex.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/scripts/xindex/xindex.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -8,7 +8,7 @@
 -----------------------------------------------------------------------
 
         xindex = xindex or { }
- local version = 0.10
+ local version = 0.12
 xindex.version = version
 --xindex.self = "xindex"
 

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -29,6 +29,7 @@
 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       = "--"
 
 
 --[[

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -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.10,
+      version = 0.12,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -26,6 +26,7 @@
 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       = "--"
 
 case_sensitive    = false  -- speeds up running
 

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -6,7 +6,7 @@
 --      LICENSE:  LPPL1.3
 -----------------------------------------------------------------------
 
-local info = { version = 0.10}
+local info = { version = 0.12 } 
 
 -- check config
 if pageNoPrefixDel ~= "" then 
@@ -106,6 +106,9 @@
 end
 ]]   -- no more needed, we redo the setting 
 
+if SORTendhook then
+  NewIndex = SORTendhook(NewIndex)
+end
 
 outFile:write("\n")
 outFile:write("\\begin{theindex}\n")
@@ -155,10 +158,12 @@
     if charType == 0 then 
       numbers = false 
       symbols = true
+      letters = false 
     end
     if charType == 1 then 
       numbers = true 
       symbols = false
+      letters = false 
     end
     if charType > 1 then 
       numbers = false 
@@ -170,7 +175,7 @@
       if firstSLine then
         firstSLine = false
         if not no_headings then
-          outFile:write("\\textbf{"..index_header[1].."}")
+          outFile:write("\\par\\textbf{"..index_header[1].."}")
           if (labelPrefix == "") then
             outFile:write("\\label{xindex-"..index_header[1].."}\n\\nopagebreak[4]\n")
           else

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg-common'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -27,3 +27,91 @@
   fr = {"\\,sq","\\,sqq"},
 }
 
+alphabet_uppercase = {
+    { 'α', 'Α' },
+    { 'β', 'Β' },
+    { 'ϐ', 'ϐ' },   
+    { 'γ', 'Γ' },
+    { 'δ', 'Δ' },
+    { 'ε', 'Ε' },
+    { 'ζ', 'Ζ' },
+    { 'η', 'Η' },
+    { 'θ', 'Θ' },
+    { 'ι', 'Ι' },
+    { 'κ', 'Κ' },
+    { 'λ', 'Λ' },
+    { 'μ', 'Μ' },
+    { 'ν', 'Ν' },
+    { 'ξ', 'Ξ' },
+    { 'ο', 'Ο' },
+    { 'π', 'Π' },
+    { 'ρ', 'Ρ' },
+    { 'σ', 'Σ' },
+    { 'ς', 'ς' },
+    { 'τ', 'Τ' },
+    { 'υ', 'Υ' },
+    { 'φ', 'Φ' },
+    { 'χ', 'Χ' },
+    { 'ψ', 'Ψ' },
+    { 'ω', 'Ω' },
+--
+    { 'a', 'A' },
+    { 'b', 'B' },
+    { 'c', 'C' },
+    { 'd', 'D' },
+    { 'e', 'E' },
+    { 'f', 'F' },
+    { 'g', 'G' },
+    { 'h', 'H' },
+    { 'i', 'I' },
+    { 'j', 'J' },
+    { 'k', 'K' },
+    { 'l', 'L' },
+    { 'm', 'M' },
+    { 'n', 'N' },
+    { 'o', 'O' },
+    { 'p', 'P' },
+    { 'q', 'Q' },
+    { 'r', 'R' },
+    { 's', 'S' },
+    { 't', 'T' },
+    { 'u', 'U' },
+    { 'v', 'V' },
+    { 'w', 'W' },
+    { 'x', 'X' },
+    { 'y', 'Y' },
+    { 'z', 'Z' },
+--
+    { 'а', 'А' },
+    { 'б', 'Б' },
+    { 'в', 'В' },
+    { 'г', 'Г' },
+    { 'д', 'Д' },
+    { 'е', 'Е' },
+    { 'ж', 'Ж' },
+    { 'з', 'З' },
+    { 'и', 'И' },
+    { 'й', 'Й' },
+    { 'к', 'К' },
+    { 'л', 'Л' },
+    { 'м', 'М' },
+    { 'н', 'Н' },
+    { 'о', 'О' },
+    { 'п', 'П' },
+    { 'р', 'Р' },
+    { 'с', 'С' },
+    { 'т', 'Т' },
+    { 'у', 'У' },
+    { 'ф', 'Ф' },
+    { 'х', 'Х' },
+    { 'ц', 'Ц' },
+    { 'ч', 'Ч' },
+    { 'ш', 'Ш' },
+    { 'щ', 'Щ' },
+    { 'ъ', 'Ъ' },
+    { 'ы', 'Ы' },
+    { 'ь', 'Ь' },
+    { 'э', 'Э' },
+    { 'ю', 'Ю' },
+    { 'я', 'Я' }
+}

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "main configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -18,6 +18,7 @@
 compressPages     = true    -- something like 12--15, instaead 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 !!!

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-cfg'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "DTK configuration to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -21,6 +21,7 @@
 numericPage       = true    -- for non numerical pagenumbers, like "VI-17"
 sublabels         = {"","","",""} -- for the sub(sub(sub-items
 pageNoPrefixDel   = ""      -- a delimiter for page numbers like "VI-17"  -- not used !!!
+rangeSymbol       = "--"
 indexOpening      = "" --[[\providecommand*\lettergroupDefault[1]{}
 \providecommand*\lettergroup[1]{%
       \par\textbf{#1}\par

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -28,7 +28,7 @@
 --~ n       2
 --------------------------------
 if not modules then modules = { } end modules ['xindex-lapp'] = {
-      version = 0.10,
+      version = 0.12,
       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	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------
 
 if not modules then modules = { } end modules ['xindex-lib'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "main library  to xindex.lua",
        author = "Herbert Voss",
     copyright = "Herbert Voss",
@@ -55,19 +55,31 @@
 
 function NormalizedUpper(strOrig)  -- return normalized UTF string.upper (ä -> A)
   local str = ""
+  local c
   for i=1, utf.len(strOrig) do
-    local c = get_normalized_char(alphabet_lower,utf.sub(strOrig,i,i))
-    str = str..string.upper(c)
+    c = get_normalized_char(alphabet_lower,utf.sub(strOrig,i,i))
+--    str = str..string.upper(c)
+    str = str..c 
   end
   strOrig = str
-  str = ""
+  str=""
   for i=1, utf.len(strOrig) do
-    local c = get_normalized_char(alphabet_upper,utf.sub(strOrig,i,i))
-    str = str..string.upper(c)
+    c = get_normalized_char(alphabet_upper,utf.sub(strOrig,i,i))
+    c = NormalizedUppercase(c)
+    str = str..c
   end
   return str
 end
 
+function NormalizedUppercase(chr)  -- return normalized UTF uppercase letter
+  for i, alphabet_entry in ipairs(alphabet_uppercase) do
+    if chr == alphabet_entry[1] then
+      return alphabet_entry[2]
+    end
+  end
+  return chr
+end
+
 function NormalizedChars(strOrig)  -- return normalized UTF string (ä -> a) with first as upper case
   local c = string.upper(get_normalized_char(alphabet_lower,utf.sub(strOrig,1,1)))
   local str = c
@@ -181,7 +193,7 @@
     if a[i]-a[i-1] > 1 then  			-- not next page
       lastPage = a[i-1]      			-- new start for a sequence search
       if lastPage - firstPage >= minCompress then 		-- sequence found
-        b[#b+1]= tostring(firstPage).."--"..tostring(lastPage)
+        b[#b+1]= tostring(firstPage)..rangeSymbol..tostring(lastPage)
       else
         b[#b+1]= firstPage
         if (firstPage ~= lastPage) then b[#b+1]= lastPage end
@@ -190,7 +202,7 @@
     end
   end
   if a[#a] - firstPage > 2 then  -- test file end
-    b[#b+1]= tostring(firstPage).."--"..tostring(a[#a])
+    b[#b+1]= tostring(firstPage)..rangeSymbol..tostring(a[#a])
   else
     b[#b+1]= firstPage
     if (firstPage ~= a[#a]) then b[#b+1]= a[#a] end
@@ -225,7 +237,7 @@
       elseif paraClose then
         lastPage = v["pages"][1]["number"]
         newEntries[#newEntries+1] = { Entry   = v["Entry"],
-                                      pages   = {{ number  = firstPage.."--"..lastPage,
+                                      pages   = {{ number  = firstPage..rangeSymbol..lastPage,
                                                   special = deleteOpenClose(v["pages"][1]["special"])}},
                                       sortChar= v["sortChar"],
                                       Macro   = v["Macro"]
@@ -358,7 +370,7 @@
   end  -- only one pageno
   if #pages == 2 then  -- only two pages
     if tonumber(pages[1]["number"]) and tonumber(pages[2]["number"]) then
-      if ((tonumber(pages[2]["number"]) - tonumber(pages[1]["number"])) == 1) and 
+      if fCompress and ((tonumber(pages[2]["number"]) - tonumber(pages[1]["number"])) == 1) and 
           (pages[1]["special"] == pages[2]["special"]) then 
         pages[1]["number"] = pages[1]["number"].."f"  
         pages[2] = nil
@@ -392,9 +404,9 @@
       elseif (#series == 1) then    --     no -f page -> only one page -> output
         newPages[#newPages+1] = series[1]
         series = {pages[i]}
-      elseif (#series > minCompress) then  -- we found series od f pages like 11, 12, 13, 14 
+      elseif (#series > minCompress) then  -- we found series or f pages like 11, 12, 13, 14 
         -- the sequenz gets the special from the first page
-        newPages[#newPages+1] = { number = series[1]["number"].."--"..series[#series]["number"], special = series[1]["special"]}  -- first..last
+        newPages[#newPages+1] = { number = series[1]["number"]..rangeSymbol..series[#series]["number"], special = series[1]["special"]}  -- first..last
         series = {pages[i]}
       else -- series < minCompress
         if fCompress then
@@ -433,7 +445,7 @@
         series = {pages[i]}
       else    --  current page is non numeric
         if (#series > minCompress) then  -- we found a page series
-          newPages[#newPages+1] = { number = series[1]["number"].."--"..series[#series]["number"], -- first..last
+          newPages[#newPages+1] = { number = series[1]["number"]..rangeSymbol..series[#series]["number"], -- first..last
                                     special =series[1]["special"] }
           series = {pages[i]}
         else -- series < minCompress
@@ -529,10 +541,13 @@
     Apage = string.format("%09s",a["pages"][1]["number"])
     Bpage = string.format("%09s",b["pages"][1]["number"])
   end
-  A = NormalizedChars(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
-  B = NormalizedChars(getSortString(b["Entry"].." "..Bpage..b["pages"][1]["special"]):gsub('!',''))
---  A = NormalizedUpper(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
---  B = NormalizedUpper(getSortString(b["Entry"].." "..Bpage..b["pages"][1]["special"]):gsub('!',''))
+  if no_caseSensitive then
+    A = NormalizedUpper(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
+    B = NormalizedUpper(getSortString(b["Entry"].." "..Bpage..b["pages"][1]["special"]):gsub('!',''))
+  else  
+    A = NormalizedChars(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
+    B = NormalizedChars(getSortString(b["Entry"].." "..Bpage..b["pages"][1]["special"]):gsub('!',''))
+  end
   writeLog(1,"UTFCompare: A--B "..A.."--"..B.."\n",2)
 -- print(A,B)
 --[[ 
@@ -583,8 +598,8 @@
     -- now we have some special page numbers 
     A = tostring(a0)
     B = tostring(b0)
-    A1 = A:find("--",1,true) or A:find("f",1,true)  -- sequence or folio pages
-    B1 = B:find("--",1,true) or B:find("f",1,true)
+    A1 = A:find(rangeSymbol,1,true) or A:find("f",1,true)  -- sequence or folio pages
+    B1 = B:find(rangeSymbol,1,true) or B:find("f",1,true)
     if A1 then a0 = tonumber(A:sub(1,A1-1)) end
     if B1 then b0 = tonumber(B:sub(1,B1-1)) end
     return tonumber(a0) < tonumber(b0)  -- numeric

Modified: trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2019-06-06 21:48:30 UTC (rev 51329)
+++ trunk/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua	2019-06-06 21:48:48 UTC (rev 51330)
@@ -5,7 +5,7 @@
 --
 
 if not modules then modules = { } end modules ['xindex-pretty'] = {
-      version = 0.10,
+      version = 0.12,
       comment = "dump a Lua table for debugging",
        author = "Steve Donovan",
     copyright = "Steve Donovan",



More information about the tex-live-commits mailing list