diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/xindex/Makefile | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf | bin | 330090 -> 358616 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex | 116 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/xindex/xindex.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua | 90 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua | 53 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua | 2 |
13 files changed, 257 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/lualatex/xindex/Makefile b/Master/texmf-dist/doc/lualatex/xindex/Makefile index 8b199ac06f7..a4fb2b95df5 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/Makefile +++ b/Master/texmf-dist/doc/lualatex/xindex/Makefile @@ -21,7 +21,7 @@ doc: # 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) diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf Binary files differindex 790ba84ba98..45f4e12f916 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf +++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex index 034e16120a9..9bc834d1131 100644 --- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex +++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex @@ -148,7 +148,8 @@ xindex [-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 @@ und foo\index{foo|fbox} \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} diff --git a/Master/texmf-dist/scripts/xindex/xindex.lua b/Master/texmf-dist/scripts/xindex/xindex.lua index 633dc753bd4..3b195991621 100755 --- a/Master/texmf-dist/scripts/xindex/xindex.lua +++ b/Master/texmf-dist/scripts/xindex/xindex.lua @@ -8,7 +8,7 @@ ----------------------------------------------------------------------- xindex = xindex or { } - local version = 0.10 + local version = 0.12 xindex.version = version --xindex.self = "xindex" diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua index cbf9dd6bc03..d79c2cc8e2e 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua @@ -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 @@ 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 = "--" --[[ diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua index 38ffcccab96..7e2b9cf7408 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua @@ -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 @@ numericPage = false -- 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 = "--" case_sensitive = false -- speeds up running diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua index 1a8919c1149..51b40cfb547 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua @@ -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 @@ for i, str0 in ipairs(escape_chars) do 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 @@ for k=1,#NewIndex do 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 @@ for k=1,#NewIndex do 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 diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua index 6446cee0a62..7f84d4e8670 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua @@ -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 @@ folium = { 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' }, +-- + { 'а', 'А' }, + { 'б', 'Б' }, + { 'в', 'В' }, + { 'г', 'Г' }, + { 'д', 'Д' }, + { 'е', 'Е' }, + { 'ж', 'Ж' }, + { 'з', 'З' }, + { 'и', 'И' }, + { 'й', 'Й' }, + { 'к', 'К' }, + { 'л', 'Л' }, + { 'м', 'М' }, + { 'н', 'Н' }, + { 'о', 'О' }, + { 'п', 'П' }, + { 'р', 'Р' }, + { 'с', 'С' }, + { 'т', 'Т' }, + { 'у', 'У' }, + { 'ф', 'Ф' }, + { 'х', 'Х' }, + { 'ц', 'Ц' }, + { 'ч', 'Ч' }, + { 'ш', 'Ш' }, + { 'щ', 'Щ' }, + { 'ъ', 'Ъ' }, + { 'ы', 'Ы' }, + { 'ь', 'Ь' }, + { 'э', 'Э' }, + { 'ю', 'Ю' }, + { 'я', 'Я' } +} diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua index f4a72a9ffcb..0670c1f4d39 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua @@ -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 @@ itemPageDelimiter = "," -- Hello, 14 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 !!! diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua index 82327ed597b..7b4f6b18c8a 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua @@ -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 @@ minCompress = 3 -- 14--17 or 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 diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua index f470fcb1e59..45c7fdec7dd 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua @@ -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", diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua index a52b44cbbb0..a8227ce7cfb 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua @@ -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 @@ end 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 @@ function findSequences(a) -- look for 1,2,3,4, ... 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 @@ function findSequences(a) -- look for 1,2,3,4, ... 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 @@ function checkParenthesis(Entries) -- search for |( ... |) entries 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 @@ function compressPageList(pages) -- called with (v["pages"]) 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 @@ if args_v then print ("compressPageList: more than two pages for the entry\n") 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 @@ if args_v then print ("compressPageList: more than two pages for the entry\n") 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 @@ function UTFCompare(a,b) 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 @@ function pageCompare(a,b) -- a = {{number=...,special=..},{...,...}} -- 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 diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua index 588f2d842a1..3e252581fc7 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua @@ -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", |