summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-31 22:41:37 +0000
committerKarl Berry <karl@freefriends.org>2019-01-31 22:41:37 +0000
commit30095088a5d9797779fc153b90647bed2c3446e0 (patch)
treec3f3196da8915fec7870dadc26ecad7951b2126f /Master
parent6c44317e8904afb8ad612d63a792b3bd6b900bf8 (diff)
xindex (31jan19)
git-svn-id: svn://tug.org/texlive/trunk@49887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/CHANGELOG1
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdfbin330244 -> 332039 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex5
-rwxr-xr-xMaster/texmf-dist/scripts/xindex/xindex.lua18
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua85
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua11
-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
13 files changed, 102 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
index 1605987af2c..6c87012aeba 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
+++ b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
@@ -1,3 +1,4 @@
+0.06b 2019-01-30 - use another monospace font to allow copy and paste
0.06a 2018-12-06 - fixes to documentationO
0.06 2018-12-06 - renamed files, more changes to HAdW-eKO
0.05 2018-12-01 - modified HAdW config
diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
index 6c3b0d941e1..6956f74f3db 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
+++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
index edce45d92cf..363e0a6dcdb 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
+++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
@@ -18,7 +18,8 @@
BoldItalicFont=*-BoldItalic,
RawFeature = -rlig,
]
-\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]
+\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
+%\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]
\newfontfamily\Japanese[Scale=MatchUppercase]{SourceHanSans}
\newfontfamily\CODE{CODE2000}
@@ -78,7 +79,7 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\xIndexVersion{#2}}
-\setVersion{version = 0.06}% can be autimatically changed by perl
+\setVersion{version = 0.06b}% can be autimatically changed by perl
\title{Program and package \texttt{xindex} \\--\\ \normalsize \xIndexVersion\ (\today)}
\author{Herbert Voß\thanks{hvoss@tug.org}}
diff --git a/Master/texmf-dist/scripts/xindex/xindex.lua b/Master/texmf-dist/scripts/xindex/xindex.lua
index 3ee85f53324..7b1ff4ab133 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.06
+ local version = 0.06b
xindex.version = version
--xindex.self = "xindex"
@@ -45,6 +45,7 @@ local args = require ('xindex-lapp') [[
-n,--noheadings
-o,--output (default "")
-l,--language (default en)
+ -p,--prefix (default "")
<input> (string)
]]
@@ -59,6 +60,18 @@ local args = require ('xindex-lapp') [[
vlevel = not args.v[1] and 0 or #args.v
not_quiet = not args["quiet"]
+local luaVersion = _VERSION
+if (luaVersion < "Lua 5.3") then
+ print("=========================================")
+ print("Sorry. but we need at least LuaTeX 1.09")
+ print("Leaving program xindex")
+ print("=========================================")
+ os.exit()
+end
+
+--local inspect = require 'inspect'
+--print(inspect(args))
+
--[[
if args.h then
print(
@@ -129,6 +142,9 @@ end
writeLog(2,"Using input file: "..inFile.."\n",0)
+labelPrefix = args.prefix
+writeLog(2,"Label prefix: "..labelPrefix.."\n",-1)
+
writeLog(2,"Loading common config file ".."xindex-cfg-common\n",1)
Config_File_Common = kpse.find_file("xindex-cfg-common.lua")
cfg_common = require(Config_File_Common)
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
index 65675eab94c..407d903928d 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.06,
+ version = 0.06b,
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 5c828936189..6b332e308fa 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------
--- FILE: xindex-HAdW-eco.lua
+-- FILE: xindex-HAdW-eKO.lua
-- DESCRIPTION: configuration file for xindex.lua
-- REQUIREMENTS:
-- AUTHOR: Herbert Voß
@@ -8,8 +8,8 @@
--
-- configuration for index files of the Heidelberger Akademie der Wissenschaften
-if not modules then modules = { } end modules ['xindex-HAdW'] = {
- version = 0.06,
+if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = {
+ version = 0.06b,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -18,7 +18,7 @@ if not modules then modules = { } end modules ['xindex-HAdW'] = {
--local version = "0.01"
-itemPageDelimiter = "," -- Hello, 14
+itemPageDelimiter = " \\dotfill " -- 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
@@ -101,8 +101,7 @@ function specialCompressPageList(pages)
--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('(.-)-',colorBox)-- replace "-" with ":\\ "
--- pages[1]["number"] = pages[1]["number"]:gsub('-',':~')-- replace "-" with ":\\ "
+ pages[1]["number"] = pages[1]["number"]:gsub('-',':~')-- replace "-" with ":~"
return pages
end -- only one pageno
--[[
@@ -154,16 +153,13 @@ sortPages = {{ origin = { number=VII/1-715, special="" },
Pages[2] = nil -- remove second page
return Pages
else -- page difference > 1
--- Pages[1]["number"] = pages[1]["number"]:gsub('-',':~') --'(.-)-',colorBox
- Pages[1]["number"] = pages[1]["number"]:gsub('(.-)-',colorBox)
+ Pages[1]["number"] = pages[1]["number"]:gsub('-',':~')
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('-',':~')
- Pages[1]["number"] = pages[1]["number"]:gsub('(.-)-',colorBox)
- Pages[2]["number"] = pages[2]["number"]:gsub('(.-)-',colorBox)
+ 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
@@ -192,15 +188,12 @@ sortPages = {{ origin = { number=VII/1-715, special="" },
sortPages = compressPageList(subPageList)
-- instead of minus between Roman/Volume and first page insert colon
if (stripLeadingSpaces(sortPages[1]["number"]) == "") then
--- colon = ""
+ colon = ""
sortPages[1]["number"] = ""
- pages[#pages+1] = { number = lastPrefix..sortPages[1]["number"], special = sortPages[1]["special"] }
else
--- colon = ':~'
- pages[#pages+1] = { number = colorBox(lastPrefix)..sortPages[1]["number"], special = sortPages[1]["special"] }
+ colon = ':~'
end
--- pages[#pages+1] = { number = lastPrefix..colon..sortPages[1]["number"], special = sortPages[1]["special"] }
- pages[#pages+1] = { number = colorBox(lastPrefix)..sortPages[1]["number"], special = sortPages[1]["special"] }
+ pages[#pages+1] = { number = lastPrefix..colon..sortPages[1]["number"], special = sortPages[1]["special"] }
for i=2,#sortPages do
pages[#pages+1] = sortPages[i]
end
@@ -255,4 +248,60 @@ function colorBox(str)
return ("\\colorbox{black!15}{"..str.."}:~")
end
+-- Pages[1]["number"] = pages[1]["number"]:gsub('(.-):~',colorBox)
+-- Pages[2]["number"] = pages[2]["number"]:gsub('(.-):~',colorBox)
+
+
+function specialGetPageList(v,hyperpage)
+ local Pages = {}
+ if v["pages"] then
+ table.sort(v["pages"],pageCompare)-- nur nötig, da User manuell eine Zeile einfügen kann
+ if specialCompressPageList then
+ Pages = specialCompressPageList(v["pages"])
+ else
+ Pages = compressPageList(v["pages"])
+ end
+-- require 'xindex-pretty'.dump(Pages) -- only for internal dump
+ local pageNo
+--[[
+\indexentry{Auto|hyperindexformat{\textbf}}{1}
+-> \item Auto, \hyperindexformat{\textbf}{1}
+
+ add for example \hyperpage{5\nohyperpage{f}} , same for ff
+
+ \item foo, \hyperpage{1\nohyperpage{f}},
+ \hyperpage{4\nohyperpage{ff}}, \hyperpage{8}
+
+]]
+ if hyperpage then
+ if string.find(v["pages"][1]["special"],"hyperindexformat") then
+ pageNo = v["pages"][1]["special"].."{"..checkFF(Pages[1]["number"].."}")
+ else
+ pageNo = "\\hyperpage{"..checkFF(Pages[1]["number"]).."}"
+ end
+ for i=2,#Pages do
+ if string.find(v["pages"][i]["special"],"hyperindexformat") then
+ pageNo = pageNo..", "..v["pages"][i]["special"].."{"..checkFF(Pages[i]["number"].."}")
+ else
+ pageNo = pageNo..", \\hyperpage{"..checkFF(Pages[i]["number"]).."}"
+ end
+-- Pages[i] = nil
+ end
+ else
+ writeLog(1,"getPageList: "..tostring(Pages[1]["special"]).."{"..tostring(Pages[1]["number"]).."}\n",2)
+ if (Pages[1]["special"] == nil) or (Pages[1]["number"] == nil) then return "" end
+ pageNo = Pages[1]["special"].."{"..Pages[1]["number"]:gsub('(.-):~',colorBox).."}"
+ for i=2,#Pages do
+ if Pages[i]["number"] then
+ pageNo = pageNo..", "..Pages[i]["special"].."{"..Pages[i]["number"]:gsub('(.-):~',colorBox).."}"
+ Pages[i] = {}
+ end
+ end
+ end
+ return pageNo
+ else
+ return ""
+ end
+end
+
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
index 78a2422bb43..1a6d2878a0d 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.06}
+local info = { version = 0.06b}
-- check config
if pageNoPrefixDel ~= "" then
@@ -169,7 +169,8 @@ for k=1,#NewIndex do
if firstSLine then
firstSLine = false
if not no_headings then
- outFile:write("\\textbf{"..index_header[1].."}\n\\nopagebreak[4]\n")
+ outFile:write("\\textbf{"..index_header[1].."}")
+ outFile:write("\\label{"..labelPrefix.."-xindex-"..index_header[1].."}\n\\nopagebreak[4]\n")
end
end
if specialItemOutput then
@@ -186,7 +187,8 @@ for k=1,#NewIndex do
firstNLine = false
outFile:write("\n\\indexspace\n")
if not no_headings then
- outFile:write("\\textbf{"..index_header[2].."}\n\\nopagebreak[4]\n")
+ outFile:write("\\textbf{"..index_header[2].."}")
+ outFile:write("\\label{"..labelPrefix.."-xindex-"..index_header[2].."}\n\\nopagebreak[4]\n")
end
end
if specialItemOutput then
@@ -202,7 +204,8 @@ for k=1,#NewIndex do
if (currentChar ~= oldChar) and (charType == 2) then
outFile:write("\n\\indexspace\n")
if not no_headings then
- outFile:write("\\textbf{"..currentChar.."}\n\\nopagebreak[4]\n")
+ outFile:write("\\textbf{"..currentChar.."}")
+ outFile:write("\\label{"..labelPrefix.."-xindex-"..currentChar.."}\n\\nopagebreak[4]\n")
end
oldChar = currentChar
end
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 f988e865169..a280e1a722a 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.06,
+ version = 0.06b,
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 1db9fc37b4e..a2ea47f8b22 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.06,
+ version = 0.06b,
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 e6b68f23fe2..65c5455b8d2 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.06,
+ version = 0.06b,
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 d640662dd53..29bb9173342 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.06,
+ version = 0.06b,
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 8390c9f118b..33911e1f5fc 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.06,
+ version = 0.06b,
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 38b1dccc479..87f0b777dc9 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.06,
+ version = 0.06b,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",