summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-07 21:07:10 +0000
committerKarl Berry <karl@freefriends.org>2019-06-07 21:07:10 +0000
commit7505e4e41b8f39a1b0869f6296bf66490f572a35 (patch)
tree86b250efba7ceeaa6cc7a30cdae792e8b3878353 /Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
parent2aaf1c424a597d028346460500be0549ae136432 (diff)
xindex (7jun19)
git-svn-id: svn://tug.org/texlive/trunk@51340 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.lua16
1 files changed, 10 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
index a8227ce7cfb..b1cfaabcb59 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.12,
+ version = 0.13,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -370,10 +370,14 @@ function compressPageList(pages) -- called with (v["pages"])
end -- only one pageno
if #pages == 2 then -- only two pages
if tonumber(pages[1]["number"]) and tonumber(pages[2]["number"]) then
- if fCompress and ((tonumber(pages[2]["number"]) - tonumber(pages[1]["number"])) == 1) and
- (pages[1]["special"] == pages[2]["special"]) then
- pages[1]["number"] = pages[1]["number"].."f"
- pages[2] = nil
+ if ((tonumber(pages[2]["number"]) - tonumber(pages[1]["number"])) == 1) and (pages[1]["special"] == pages[2]["special"]) then
+ if fCompress then
+ pages[1]["number"] = pages[1]["number"]..page_folium[1]
+ pages[2] = nil
+ elseif minCompress == 1 then
+ pages[1]["number"] = pages[1]["number"]..rangeSymbol..pages[2]["number"]
+ pages[2] = nil
+ end
-- elseif (pages[1]["number"] == pages[2]["number"]) and
-- (pages[1]["special"] == pages[2]["special"]) then
-- pages[2] = nil
@@ -386,7 +390,7 @@ function compressPageList(pages) -- called with (v["pages"])
local startIndex
local newPages = {} -- { pages[1], pages[2], ... }
local series = {} -- { pages[1], pages[2], ... }
- if tonumber(pages[1]["number"]) then -- if a number we start with seconf page
+ if tonumber(pages[1]["number"]) then -- if a number we start with second page
newPages = {}
series = {pages[1]}
startIndex = 2