summaryrefslogtreecommitdiff
path: root/indexing/xindex/lualatex/xindex-lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'indexing/xindex/lualatex/xindex-lib.lua')
-rw-r--r--indexing/xindex/lualatex/xindex-lib.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/indexing/xindex/lualatex/xindex-lib.lua b/indexing/xindex/lualatex/xindex-lib.lua
index fd36c1560c..5cc397b799 100644
--- a/indexing/xindex/lualatex/xindex-lib.lua
+++ b/indexing/xindex/lualatex/xindex-lib.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-lib'] = {
- version = 0.19,
+ version = 0.20,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -115,6 +115,7 @@ 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 ("")
@@ -263,12 +264,10 @@ function checkParenthesis(Entries) -- search for |( ... |) entries
end
function replaceVerticalChar(v)
--- res, _ = string.gsub(v:gsub('|[()]$', ''), '|[()]?', ' \\')
--- return res
if not v:match('|') then
return v,""
else
- return v:gsub('|.*',''), v:match('|.*'):gsub('|','\\'):gsub("%s+", "") -- part before, part after | without spaces
+ return v:gsub('|.*',''), v:match('|.*'):gsub('|','\\')--:gsub("%s+", "") -- part before, part after | without spaces
end
end
@@ -555,10 +554,10 @@ function GenerateSortKey(a)
Apage = string.format("%09s",a["pages"][1]["number"])
end
if no_caseSensitive then
- A = NormalizedUpper(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
+ A = NormalizedUpper(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!',' ')) -- replace! by empty
a["SortKey"] = A
else
- A = NormalizedChars(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!','')) -- replace! by empty
+ A = NormalizedChars(getSortString(a["Entry"].." "..Apage..a["pages"][1]["special"]):gsub('!',' ')) -- replace! by empty
a["SortKey"] = A
end
-- return A
@@ -882,7 +881,7 @@ function itemOutput(last, v, hyperpage)
for i, str0 in ipairs(escape_chars) do -- undo the escape char setting
str = str:gsub(str0[2],str0[3])
end
- outFile:write(str)
+ outFile:write(str); indLines=indLines+1
lastItems = {}
lastItems[1] = Entry
else
@@ -906,7 +905,7 @@ function itemOutput(last, v, hyperpage)
for i, str0 in ipairs(escape_chars) do -- undo the escape char setting
str = string.gsub(str,str0[2],str0[3])
end
- outFile:write(str)
+ outFile:write(str); indLines=indLines+1
lastItems[i] = currentItems[i]
else
writeLog(1,"itemOutput: currentItems[i]: "..currentItems[i].."= lastItems[i]: "..lastItems[i].."\n",2)