summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-07 20:39:32 +0000
committerKarl Berry <karl@freefriends.org>2020-06-07 20:39:32 +0000
commit66bad2fbc22018a6fad79b2b887618c623d45792 (patch)
treefbd02e3cf655696b1c9e0d32d3bbbb2524f6c251 /Master/texmf-dist/tex
parentd6792fa20e742d8d2aaa6fb83a73eec8511912d0 (diff)
xindex (7jun20)
git-svn-id: svn://tug.org/texlive/trunk@55470 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua5
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua3
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua36
-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.lua9
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua256
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua2
12 files changed, 310 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
index 6b925e33679..6d68e8b453d 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.23,
+ version = 0.24,
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 9b440fa94dc..2be1351b240 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.23,
+ version = 0.24,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
index 6c51f217632..0670451d026 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.23 }
+local info = { version = 0.24 }
-- check config
if pageNoPrefixDel ~= "" then
@@ -121,6 +121,7 @@ end
]] -- no more needed, we redo the setting
if use_UCA then
+ writeLog(2,"Endhook for UCA ...",0)
for i=1, #NewIndex do
v = NewIndex[i]
-- the collator:get_lowest_char will return character on the given
@@ -133,6 +134,7 @@ if use_UCA then
v.sortChar = getSortChar(codepoints)
end
end
+ writeLog(2,"done\n",0)
end
if SORTendhook then
@@ -162,6 +164,7 @@ local excl = 0 -- number of ! symbols in one entry
local lastItems = {"","",""}
indLines = 0
writeLog(2,"Start writing .ind file ... \n",0)
+require 'xindex-pretty'.dump(NewIndex) -- only for internal dump
-- first the special cases for symbols and numbers:
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 85f2c033b8e..0754f3a772d 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.23,
+ version = 0.24,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -22,6 +22,7 @@ indexheader = {
fr = {"Symboles","Nombres"},
it = {"Simboli", "Numeri"},
jp = {"シンボル","番号"},
+ no = {"Symboler","Tall"},
}
folium = {
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
index 42ad4ec6ddf..1930fcb4e62 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
- version = 0.23,
+ version = 0.24,
comment = "configuration to xindex-cfg-uca.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -15,3 +15,37 @@ if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
}
-- put any additional code for lua-uca here ---
+languages.no = function(collator_obj)
+ local tailoring = function(s) collator_obj:tailor_string(s) end
+ collator_obj:uppercase_first()
+-- tailoring("&[before 1]b<á<<<Á")
+-- tailoring("&[before 1]d<č<<<Č<ʒ<<<Ʒ<ǯ<<<Ǯ")
+-- tailoring("&[before 1]e<đ<<<Đ<<ð<<<Ð")
+-- tailoring("&[before 1]h<ǧ<<<Ǧ<ǥ<<<Ǥ")
+-- tailoring("&[before 1]l<ǩ<<<Ǩ")
+-- tailoring("&[before 1]o<ŋ<<<Ŋ<<ń<<<Ń<<ñ<<<Ñ")
+-- tailoring("&[before 1]t<š<<<Š")
+-- tailoring("&[before 1]u<ŧ<<<Ŧ<<þ<<<Þ")
+-- tailoring("&y<<ü<<<Ü<<ű<<<Ű")
+-- tailoring("&[before 1]ǀ<ž<<<Ž<ø<<<Ø<<œ<<<Œ<æ<<<Æ<å<<<Å<<ȧ<<<Ȧ<ä<<<Ä<<ã<<<Ã<ö<<<Ö<<ő<<<Ő<<õ<<<Õ<<ô<<<Ô<<ǫ<<<Ǫ")
+-- tailoring("&D<<đ<<<Đ<<ð<<<Ð")
+-- tailoring("&th<<<þ")
+-- tailoring("&TH<<<Þ")
+-- tailoring("&Y<<ü<<<Ü<<ű<<<Ű")
+-- tailoring("&ǀ<æ<<<Æ<<ä<<<Ä<ø<<<Ø<<ö<<<Ö<<ő<<<Ő<å<<<Å<<<aa<<<Aa<<<AA")
+-- tailoring("&oe<<œ<<<Œ")
+ tailoring("&A<a<B<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<Æ<Ø<Å")
+ return collator_obj
+end
+
+--ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ
+
+--[[
+Symbol Example Description
+< a < b Identifies a primary (base letter) difference between "a" and "b"
+<< a << ä Signifies a secondary (accent) difference between "a" and "ä"
+<<< a<<<A Identifies a tertiary difference between "a" and "A"
+<<<< か<<<<カ Identifies a quaternary difference between "か" and "カ". (New in ICU 53.) ICU permits up to three quaternary relations in a row (except for intervening "=" identity relations).
+= x = y Signifies no difference between "x" and "y".
+& &Z Instructs ICU to reset at this letter. These rules will be relative to this letter from here on, but will not affect the position of Z itself.
+]] \ No newline at end of file
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
index 7b23b7c905e..67b0eea46ff 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.23,
+ version = 0.24,
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 6a32d5e863f..b16af640287 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.23,
+ version = 0.24,
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 94c22cb240d..0d9a7ee2af9 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.23,
+ version = 0.24,
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 720d473d53d..619baf992ce 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.23,
+ version = 0.24,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -618,12 +618,15 @@ function charCompare(a,b) -- compare only first char
end
function checkFF(p)
+ -- for hyperref: replace \hyperpage{1\,ff} -> \hyperpage{1\nohyperpage{\,ff}}
if not p then return p end
local P = tostring(p)
if P:find("ff") then
- return P:gsub('%a+','').."\\nohyperpage{"..page_folium[2].."}"
+ local str = P:gsub(page_folium[2],'').."\\nohyperpage{"..page_folium[2].."}"
+ return str
elseif P:find("f") then
- return P:gsub('%a+','').."\\nohyperpage{"..page_folium[1].."}"
+ local str = P:gsub(page_folium[1],'').."\\nohyperpage{"..page_folium[1].."}"
+ return str
else
return P
end
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
new file mode 100644
index 00000000000..1bd7b350319
--- /dev/null
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
@@ -0,0 +1,256 @@
+-----------------------------------------------------------------------
+-- 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-no'] = {
+ version = 0.24,
+ comment = "configuration to xindex.lua",
+ author = "Herbert Voss",
+ copyright = "Herbert Voss",
+ license = "LPPL 1.3"
+}
+
+
+itemPageDelimiter = "," -- Hello, 14
+compressPages = true -- something like 12--15, instaead of 12,13,14,15. the |( ... |) syntax is still valid
+fCompress = false -- 3f -> page 3, 4 and 3ff -> page 3, 4, 5
+minCompress = 2 -- 14--17 or
+rangeSymbol = "-" -- 14-17 instead of --
+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 !!!
+indexOpening = "" -- commands after \begin{theindex}
+idxnewletter = "\\textbf" -- Only valid if -n is not set
+
+escape_chars = { -- by default " is the escape char
+ {'""', "\\escapedquote", '\"{}' },
+ {'"@', "\\escapedat", "@" },
+ {'"|', "\\escapedvert", "|" },
+ {'"!', "\\escapedexcl", "!" },
+ {'"(', "\\escapedparenleft", "(" },
+ {'")', "\\escapedparenright", ")" }
+}
+
+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', 'š', 'ß' },
+ { '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', 'Ž' },
+ { 'Æ', 'Œ', 'Ä' },
+ { 'Ø', 'Ö' },
+ { 'Å' }
+}
+
+--ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ
+
+--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 Ž Æ Ä Ø Ö Å Aa
+--1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 75
+--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 ž æ ä ø ö å aa
+--2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 76
+
+alphabet_sort = {
+{"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"},
+{"Ž"},
+{"ž"},
+{"Æ"},
+{"æ"},
+{"Ä"},
+{"ä"},
+{"Ø"},
+{"ø"},
+{"Ö"},
+{"ö"},
+{"Å", "Aa"},
+{"å", "aa"},
+{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
+}
+
+--function getCharType(c)
+-- return 2
+--end
+
+function SORTendhook(list)
+ print ("We have "..#list.." total list entries")
+ local alpha = {}
+ local symbols = {}
+ local numbers = {}
+ local others = {}
+ local firstChar, charType
+ local firstCharNumber
+ local v
+ local latin = {}
+ print ("#alphabet_sort: "..#alphabet_sort)
+ for j=1,#alphabet_sort do
+ print ("Check: "..alphabet_sort[j][1].."["..#alphabet_sort[j].."]")
+ for i=1,#list do
+ v = list[i]
+ if #alphabet_sort[j] > 1 then
+ for k = 1,#alphabet_sort[j] do
+ if utf.sub(v["Entry"],1,1) == alphabet_sort[j][k] then
+ print (alphabet_sort[j],v["Entry"])
+ latin[#latin+1] = v
+ end
+ end
+ else
+ if utf.sub(v["Entry"],1,1) == alphabet_sort[j][1] then
+ print (alphabet_sort[j][1],v["Entry"])
+ latin[#latin+1] = v
+ end
+ end
+ end
+ end
+--[[
+ for i=1,#list do
+ v = list[i]
+ firstChar = NormalizedUppercase(utf.sub(v["sortChar"],1,1))
+ v["sortChar"] = firstChar -- to be sure it is an uppercase unicode char
+ firstCharNumber = string.utfvalue(firstChar)
+ charType = getCharType(firstChar)
+ if charType == 0 then
+ symbols[#symbols+1] = v
+ elseif charType == 1 then
+ numbers[#numbers+1] = v
+ elseif firstCharNumber > 0x052F then -- 0x052F is last cyrillic character
+ others[#others+1] = v
+ end
+ end
+ print ("We have "..#letter.." Latin entries")
+ print ("We have "..#symbols.." Symbol entries")
+ print ("We have "..#numbers.." Number entries")
+ print ("We have "..#others.." other entries")
+
+ list = {}
+ for i = 1,#letter do list[#list+1] = letter[i] end
+ list[#list]["Macro"] = "\\vspace{1cm}"
+ for i = 1,#symbols do list[#list+1] = symbols[i] end
+ for i = 1,#numbers do list[#list+1] = numbers[i] end
+ for i = 1,#others do list[#list+1] = others[i] end
+ print ("Sorted "..#list.." entries")
+ return list
+]]
+ return latin
+end
+
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
index b671ba004e8..8408bbeba9a 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.23,
+ version = 0.24,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua
index 85bef308b91..87e762e180b 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-yannis'] = {
- version = 0.23,
+ version = 0.24,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",