summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-25 20:47:34 +0000
committerKarl Berry <karl@freefriends.org>2019-03-25 20:47:34 +0000
commit2a1772885b59e209e9e7c7f5136d420556d11829 (patch)
treee3dbee20374afff8fd03d9c62b8d140db985b565 /Master/texmf-dist/tex/lualatex
parent01303b6e878b8bcccb9595ce53d89d98878f4df3 (diff)
xindex (25mar19)
git-svn-id: svn://tug.org/texlive/trunk@50588 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua26
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua2
9 files changed, 22 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
index 2c7cb41c337..dae45fa7fb7 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.08,
+ version = 0.09,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
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 c5bed9618b6..1ceade22381 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.08,
+ version = 0.09,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -98,7 +98,7 @@ alphabet_upper = { -- for sorting
--\indexentry{Bremen!Adalbert I. von, Erzbischof}{VII/1-50}
function specialCompressPageList(pages)
---print(#pages..".. number:|"..pages[1]["number"].."| Special:"..pages[1]["special"])
+-- print(#pages..".. number:|"..pages[1]["number"].."| Special:"..pages[1]["special"])
if (pages[1]["number"] == "") then pages[1]["number"] = " " end
if (#pages <= 1) then
pages[1]["number"] = pages[1]["number"]:gsub('-',':~')-- replace "-" with ":~"
@@ -118,24 +118,25 @@ sortPages = {{ origin = { number=VII/1-715, special="" },
local i
--print("----------------------------------------")
for i=1,#pages do
- roman = string.gsub(pages[i]["number"],'%U*','') -- only uppercase to catch VII123f (folium pages)
+ roman = string.gsub(pages[i]["number"],'%U*','') -- only uppercase to catch VII/1-123f and VII/3-123ff (folium pages)
if romanToNumber(roman) then
- roman = string.format("%05d",tonumber(romanToNumber(roman)))
+ roman = string.format("%05d",tonumber(romanToNumber(roman))) -- only roman part VII
else
roman = ""
end
- volume = string.gsub(pages[i]["number"],'%a*','')
- if volume then volume = volume:gsub('-%d*','') end
+ volume = string.gsub(pages[i]["number"],'%a*','') -- only the number /2 123 or /2-123
+ if volume then volume = volume:gsub('-%d*','') end -- delete - char to get /2
page = string.gsub(pages[i]["number"],'.*-','')
page = string.format("%5s",page)
sortPages[#sortPages+1] = {
- origin = pages[i],
- sort = roman..volume.." "..page } -- no minus between Roman/Volume and first page
+ origin = pages[i],
+ sort = roman..volume.." "..page } -- no minus between Roman/Volume and first page
--print(roman..volume.." "..page.." Special:"..pages[i]["special"])
end
-- sort the page list
table.sort(sortPages, function(a,b) return a["sort"] < b["sort"] end )
local Pages = {}
+-- writeLog(1,print(getRawPagesP(sortPages)),2)
for i=1,#sortPages do -- use the sorted origin table
Pages[#Pages+1] = sortPages[i]["origin"]
end
@@ -143,7 +144,8 @@ sortPages = {{ origin = { number=VII/1-715, special="" },
-- test if two or more pages in the list
if #Pages == 2 then -- only two pages
local page1 = string.gsub(Pages[1]["number"],'%A*','') -- get prefix1
- local page2 = string.gsub(Pages[2]["number"],'%A*','') -- ger prefix2
+ local page2 = string.gsub(Pages[2]["number"],'%A*','') -- get prefix2
+ print(page1,Pages[1]["number"],page2,Pages[2]["number"])
if (page1 == page2) then -- same prefix
page1 = string.gsub(Pages[1]["number"],'.*-','') -- get page1
page2 = string.gsub(Pages[2]["number"],'.*-','') -- get page2
@@ -157,9 +159,9 @@ sortPages = {{ origin = { number=VII/1-715, special="" },
Pages[2]["number"] = string.gsub(Pages[2]["number"],'.*-','') -- use only number -> same prefix
return Pages -- Pages[1] is the same
end
- else
- Pages[1]["number"] = pages[1]["number"]:gsub('-',':~')
- Pages[2]["number"] = pages[2]["number"]:gsub('-',':~')
+ else -- different prefixes
+ Pages[1]["number"] = Pages[1]["number"]:gsub('-',':~')
+ Pages[2]["number"] = Pages[2]["number"]:gsub('-',':~')
return Pages -- different prefix -> simple return of the two pages
end
else -- more than two pages
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
index 53de3b76663..0588651541e 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.08}
+local info = { version = 0.09}
-- check config
if pageNoPrefixDel ~= "" then
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 feb056daafe..db8c81f6ade 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.08,
+ version = 0.09,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
index 1b4561123b3..3ceea684e8e 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.08,
+ version = 0.09,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
index c9ac3fa12ab..f04c359c663 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.08,
+ version = 0.09,
comment = "DTK configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
index 121c425fe34..5c7c8cd7715 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.08,
+ version = 0.09,
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 78787351d45..b9464eb1f5f 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.08,
+ version = 0.09,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
index b503d752c90..84754c18ce1 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.08,
+ version = 0.09,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",