diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-22 22:19:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-22 22:19:47 +0000 |
commit | 22795003e66903d4206e43046c1d414a111ee5e3 (patch) | |
tree | c5d5b68a0f500a8c9fb7a339e440285edad1e8af /Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua | |
parent | c5aef0f08e1dc8f5fab3d1a598012a93bd76dedd (diff) |
xindex (22nov19)
git-svn-id: svn://tug.org/texlive/trunk@52892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua index fd36c1560c4..5cc397b799b 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.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) |