summaryrefslogtreecommitdiff
path: root/indexing/xindex/lualatex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-19 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2023-01-19 03:01:20 +0000
commitc11207d3e9027d6aa4153a2103df58382d41e56e (patch)
treebde001e74895007216ab81847975bd9143182d60 /indexing/xindex/lualatex
parent8491e6b8fb521fb1c79d3ce9376836c67050c381 (diff)
CTAN sync 202301190301
Diffstat (limited to 'indexing/xindex/lualatex')
-rw-r--r--indexing/xindex/lualatex/xindex-AU.lua104
-rw-r--r--indexing/xindex/lualatex/xindex-HAdW-eKO.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-base.lua26
-rw-r--r--indexing/xindex/lualatex/xindex-baselib.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg-common.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg-uca.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-danteedition.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-dtk.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-lib.lua8
-rw-r--r--indexing/xindex/lualatex/xindex-norsk.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-pretty.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-yannis.lua2
13 files changed, 143 insertions, 15 deletions
diff --git a/indexing/xindex/lualatex/xindex-AU.lua b/indexing/xindex/lualatex/xindex-AU.lua
new file mode 100644
index 0000000000..e69311fb3e
--- /dev/null
+++ b/indexing/xindex/lualatex/xindex-AU.lua
@@ -0,0 +1,104 @@
+-----------------------------------------------------------------------
+-- FILE: xindex-AU.lua
+-- DESCRIPTION: configuration file for xindex.lua
+-- REQUIREMENTS:
+-- AUTHOR: Herbert Voß
+-- LICENSE: LPPL1.3
+--
+-- $Id: xindex-DIN2.lua 13 2021-08-15 10:49:40Z hvoss $
+-----------------------------------------------------------------------
+
+if not modules then modules = { } end modules ['xindex-AU'] = {
+ version = 0.46,
+ comment = "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
+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}"
+
+
+--[[
+ 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', 'Ž' }
+}
+
diff --git a/indexing/xindex/lualatex/xindex-HAdW-eKO.lua b/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
index 8f31687b8e..bd95ecb5a8 100644
--- a/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
+++ b/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
@@ -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.45,
+ version = 0.46,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-base.lua b/indexing/xindex/lualatex/xindex-base.lua
index a7bd416934..968d130ba8 100644
--- a/indexing/xindex/lualatex/xindex-base.lua
+++ b/indexing/xindex/lualatex/xindex-base.lua
@@ -8,7 +8,7 @@
-- $Id: xindex-base.lua 22 2022-02-07 12:18:15Z hvoss $
-----------------------------------------------------------------------
-local info = { version = 0.45 }
+local info = { version = 0.46 }
-- check config
if pageNoPrefixDel ~= "" then
@@ -47,6 +47,14 @@ if #lines == 0 then
os.exit()
end
+print("Presort of \\indexentry lines")
+table.sort(lines)
+if vlevel > 1 then
+ print("Pres-Sorted index list:")
+ for _,l in pairs(lines) do print (l) end
+end
+
+
if vlevel > 1 then
writeLog(1,"--------------- Input data -----------------\n",2)
for _,l in pairs(lines) do writeLog(1,l.."\n",2) end
@@ -214,10 +222,22 @@ for k=1,#NewIndex do
-- if utf8.codepoint(c) < 12288 then -- Japanese starts at hex 3000
-- firstChar = v["sortChar"]
-- else
- firstChar = utf.sub(v["sortChar"],1,1) -- catch a translatet Ö->OE
+ if language == "cs" then -- Czech language has special char ch
+ if utf.sub(v["sortChar"],1,2) == "CH" then
+ firstChar = "Ch"
+ else
+ firstChar = utf.sub(v["sortChar"],1,1)
+ end
+ else
+ firstChar = utf.sub(v["sortChar"],1,1) -- catch a translatet Ö->OE
+ end
-- end
currentChar = firstChar
- charType = getCharType(firstChar)
+ if string.len(firstChar) > 1 then
+ charType = getCharType(utf.sub(firstChar,1,1))
+ else
+ charType = getCharType(firstChar)
+ end
if charType == 0 then
numbers = false
symbols = true
diff --git a/indexing/xindex/lualatex/xindex-baselib.lua b/indexing/xindex/lualatex/xindex-baselib.lua
index bc2c49a59c..a0a07fcdfd 100644
--- a/indexing/xindex/lualatex/xindex-baselib.lua
+++ b/indexing/xindex/lualatex/xindex-baselib.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-baselib'] = {
- version = 0.45,
+ version = 0.46,
comment = "base library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg-common.lua b/indexing/xindex/lualatex/xindex-cfg-common.lua
index 23f70745a0..cade65084c 100644
--- a/indexing/xindex/lualatex/xindex-cfg-common.lua
+++ b/indexing/xindex/lualatex/xindex-cfg-common.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-common'] = {
- version = 0.45,
+ version = 0.46,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg-uca.lua b/indexing/xindex/lualatex/xindex-cfg-uca.lua
index 96e7792bd9..3aa2eadc40 100644
--- a/indexing/xindex/lualatex/xindex-cfg-uca.lua
+++ b/indexing/xindex/lualatex/xindex-cfg-uca.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
- version = 0.45,
+ version = 0.46,
comment = "configuration to xindex-cfg-uca.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg.lua b/indexing/xindex/lualatex/xindex-cfg.lua
index 520eb6ca8f..5778980fd4 100644
--- a/indexing/xindex/lualatex/xindex-cfg.lua
+++ b/indexing/xindex/lualatex/xindex-cfg.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.45,
+ version = 0.46,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-danteedition.lua b/indexing/xindex/lualatex/xindex-danteedition.lua
index e720cfe4a6..15ac0c7385 100644
--- a/indexing/xindex/lualatex/xindex-danteedition.lua
+++ b/indexing/xindex/lualatex/xindex-danteedition.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.45,
+ version = 0.46,
comment = "configuration file for the DANTE Edition",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-dtk.lua b/indexing/xindex/lualatex/xindex-dtk.lua
index 347edad833..c83109a51a 100644
--- a/indexing/xindex/lualatex/xindex-dtk.lua
+++ b/indexing/xindex/lualatex/xindex-dtk.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.45,
+ version = 0.46,
comment = "DTK configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-lib.lua b/indexing/xindex/lualatex/xindex-lib.lua
index 67fc733488..c8b2a73718 100644
--- a/indexing/xindex/lualatex/xindex-lib.lua
+++ b/indexing/xindex/lualatex/xindex-lib.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-lib'] = {
- version = 0.45,
+ version = 0.46,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -798,7 +798,11 @@ function itemOutput(last, v, hyperpage)
if (i == 1) and (item == "item") then
str = space.."\\"..item.." "..sublabels[i]..currentItems[i].."\n"
else
- str = space.."\\"..item.." "..sublabels[i]..currentItems[i]..itemPageDelimiter.." "..getPageList(v,hyperpage).."\n"
+ if i < excl+1 then -- there is one more ! => so we print no pagenumber
+ str = space.."\\"..item.." "..sublabels[i]..currentItems[i].."\n"
+ else
+ str = space.."\\"..item.." "..sublabels[i]..currentItems[i]..itemPageDelimiter.." "..getPageList(v,hyperpage).."\n"
+ end
end
for i, str0 in ipairs(escape_chars) do -- undo the escape char setting
str = string.gsub(str,str0[2],str0[3])
diff --git a/indexing/xindex/lualatex/xindex-norsk.lua b/indexing/xindex/lualatex/xindex-norsk.lua
index aaf4f212bb..119de90d5f 100644
--- a/indexing/xindex/lualatex/xindex-norsk.lua
+++ b/indexing/xindex/lualatex/xindex-norsk.lua
@@ -10,7 +10,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-no'] = {
- version = 0.45,
+ version = 0.46,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-pretty.lua b/indexing/xindex/lualatex/xindex-pretty.lua
index 9f097f6285..2706977090 100644
--- a/indexing/xindex/lualatex/xindex-pretty.lua
+++ b/indexing/xindex/lualatex/xindex-pretty.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-pretty'] = {
- version = 0.45,
+ version = 0.46,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",
diff --git a/indexing/xindex/lualatex/xindex-yannis.lua b/indexing/xindex/lualatex/xindex-yannis.lua
index e7dac7eba5..9ef3151f92 100644
--- a/indexing/xindex/lualatex/xindex-yannis.lua
+++ b/indexing/xindex/lualatex/xindex-yannis.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-yannis'] = {
- version = 0.45,
+ version = 0.46,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",