diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/xindex')
13 files changed, 53 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua index 22167d63c91..1c13afc242d 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-DIN2.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-DIN2.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-cfg'] = { - version = 0.31, + version = 0.33, comment = "configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -35,6 +35,8 @@ 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}" --[[ 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 5a9b114a356..49852aa89b4 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua @@ -5,13 +5,13 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-HAdW-eKO.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-HAdW-eKO.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- -- -- configuration for index files of the Heidelberger Akademie der Wissenschaften if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = { - version = 0.31, + version = 0.33, comment = "configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -30,7 +30,8 @@ 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}" case_sensitive = false -- speeds up running folium = { diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua index 6df683605f2..13e4db70f75 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua @@ -5,10 +5,10 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-base.lua 9 2021-08-13 19:42:48Z hvoss $ +-- $Id: xindex-base.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- -local info = { version = 0.31 } +local info = { version = 0.33 } -- check config if pageNoPrefixDel ~= "" then @@ -116,13 +116,13 @@ writeLog(2,"done\n",0) writeLog(2,"Replace @-operator ...\n",0) writeLog(1,"------------------ Start list before compressEntryList(Index)------------\n",1) -writeLog(1,require 'xindex-pretty'.dump(Index),3) -- only for internal dump +--writeLog(1,require 'xindex-pretty'.dump(Index),3) -- only for internal dump local NewIndex = {} NewIndex = compressEntryList(Index) -- replaces also foo@bar -> bar -- for i=1,#NewIndex do print(NewIndex[i]["Entry"],NewIndex[i]["pages"][1]["number"],NewIndex[i]["pages"][1]["special"]) end -writeLog(1,require 'xindex-pretty'.dump(NewIndex),3) -- only for internal dump +--writeLog(1,require 'xindex-pretty'.dump(NewIndex),3) -- only for internal dump printList(NewIndex,2) writeLog(1,"------------------ End list after compressEntryList(Index)------------\n",1) writeLog(2,"done\n",0) @@ -156,7 +156,7 @@ if SORTendhook then end outFile:write("\n") -outFile:write("\\begin{theindex}\n") +outFile:write(envStart.."\n") if indexOpening ~= "" then -- commands after \begin{theindex} outFile:write(indexOpening) @@ -221,7 +221,8 @@ for k=1,#NewIndex do if firstSLine then firstSLine = false if not no_headings then - outFile:write("\\par"..idxnewletter.."{"..index_header[1].."}") + outFile:write(idxnewletter.."{"..index_header[1].."}") +-- outFile:write("\\par"..idxnewletter.."{"..index_header[1].."}") if no_labels then outFile:write("\n\\nopagebreak[4]\n") else @@ -294,8 +295,8 @@ for k=1,#NewIndex do if v["Macro"] then outFile:write(v["Macro"].."\n") end end end -outFile:write("\\end{theindex}\n") -writeLog(2,indLines.." lines of data wrote into the .ind file\n",0) +outFile:write(envStop.."\n") +writeLog(2,indLines.." lines of data wrote into the "..outfilename.." file\n",0) outFile:close() writeLog(2,"\ndone! closing program\n",0) diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua index ba1e0d27cce..5dd579a19f0 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-baselib.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-baselib.lua 11 2021-08-14 09:46:46Z hvoss $ +-- $Id: xindex-baselib.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-baselib'] = { - version = 0.31, + version = 0.33, comment = "base library to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", 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 18c97ade807..eba315f21ff 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-cfg-common.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-cfg-common.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-cfg-common'] = { - version = 0.31, + version = 0.33, comment = "configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", 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 57fb142d743..b2ed04dbc95 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-cfg-uca.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-cfg-uca.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-cfg-lua'] = { - version = 0.31, + version = 0.33, comment = "configuration to xindex-cfg-uca.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 5824d12d910..3b7bb06c25b 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-cfg.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-cfg.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-cfg'] = { - version = 0.31, + version = 0.33, comment = "main configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -24,8 +24,10 @@ 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 !!! -indexOpening = "" -- commands after \begin{theindex} +indexOpening = "" -- commands after envStart 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'. diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua index 662a0deb9dc..446cc5bc7f0 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-dtk.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-dtk.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-cfg'] = { - version = 0.31, + version = 0.33, 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 cb79a0d5502..e3804133369 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua @@ -1,7 +1,7 @@ -- lapp.lua -- Simple command-line parsing using human-readable specification -- --- $Id: xindex-lapp.lua 9 2021-08-13 19:42:48Z hvoss $ +-- $Id: xindex-lapp.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------- --~ -- args.lua --~ local args = require ('lapp') [[ @@ -78,13 +78,18 @@ local function trim(s) return ltrim(rtrim(s)) end -local function open (file,opt) +--- open a file. +-- This will quit on error, and keep a list of file objects for later cleanup. +-- @string file filename +-- @string[opt] opt same as second parameter of `io.open` +function open (file,opt) local val,err = io.open(file,opt) if not val then - val,err = io.open(file..".idx",opt) - if not val then - error(err,true) - end + file = file..".idx" + val,err = io.open(file,opt) + if not val then + error(err,true) + end end append(open_files,val) return val diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua index 906ea00b699..a7936ffb0f4 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-lib.lua 9 2021-08-13 19:42:48Z hvoss $ +-- $Id: xindex-lib.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-lib'] = { - version = 0.31, + version = 0.33, comment = "main library to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -142,7 +142,6 @@ function checkVert(str) -- get the | part if (vert) then vertStr = string.sub(str,vert+1) str = string.sub(str,1,vert-1) -print(vertStr) return (vertStr) else return ("") diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua index c33b89cda36..82e443d17a5 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua @@ -6,11 +6,11 @@ -- MODIFIED: Sveinung Heggen (2020-01-02) -- LICENSE: LPPL1.3 -- --- $Id: xindex-norsk.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-norsk.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-no'] = { - version = 0.31, + version = 0.33, comment = "configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -28,6 +28,8 @@ sublabels = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-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 +envStart = "\\begin{theindex}" +envStop = "\\end{theindex}" escape_chars = { -- by default " is the escape char {'""', "\\escapedquote", '\"{}' }, diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua index e50e6f0ff8a..e27bedaf5ab 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua @@ -3,11 +3,11 @@ -- Also provides a sandboxed Lua table reader and -- a function to present large numbers in human-friendly format. -- --- $Id: xindex-pretty.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-pretty.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-pretty'] = { - version = 0.31, + version = 0.33, 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 4b1565b2a57..e2b69ac148c 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-yannis.lua @@ -5,11 +5,11 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-yannis.lua 6 2021-08-13 07:08:46Z hvoss $ +-- $Id: xindex-yannis.lua 12 2021-08-15 09:28:32Z hvoss $ ----------------------------------------------------------------------- if not modules then modules = { } end modules ['xindex-yannis'] = { - version = 0.31, + version = 0.33, comment = "main configuration to xindex.lua", author = "Herbert Voss", copyright = "Herbert Voss", @@ -26,6 +26,8 @@ sublabels = {"", "-\\,", "--\\,", "---\\,"} -- for the (sub(sub(sub-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 +envStart = "\\begin{theindex}" +envStop = "\\end{theindex}" --[[ |