summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/page-ini.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/page-ini.lua43
1 files changed, 29 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
index 5b73c972903..3d553412815 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
@@ -41,23 +41,39 @@ function pages.mark(name,list)
local page = list[i]
local sign = false
if type(page) == "string" then
- local s, p = match(page,"([%+%-])(%d+)")
- if s then
- sign, page = s, p
+ local f, t = match(page,"(%d+)[:%-](%d+)")
+ if f and t then
+ f, t = tonumber(f), tonumber(t)
+ if f and t and f <= t then
+ if trace then
+ report("marking page %i upto %i as %a",f,t,name)
+ end
+ for page=f,t do
+ data[page][name] = true
+ end
+ end
+ page = false
+ else
+ local s, p = match(page,"([%+%-])(%d+)")
+ if s then
+ sign, page = s, p
+ end
end
end
- page = tonumber(page)
if page then
- if sign == "+" then
- page = realpage + page
- end
- if sign == "-" then
- report("negative page numbers are not supported")
- else
- if trace then
- report("marking page %i as %a",page,name)
+ page = tonumber(page)
+ if page then
+ if sign == "+" then
+ page = realpage + page
+ end
+ if sign == "-" then
+ report("negative page numbers are not supported")
+ else
+ if trace then
+ report("marking page %i as %a",page,name)
+ end
+ data[page][name] = true
end
- data[page][name] = true
end
end
end
@@ -75,7 +91,6 @@ local function marked(name)
rawset(data,i,nil)
end
local pagedata = rawget(data,realpage)
- print(pagedata and pagedata[name] and true or false)
return pagedata and pagedata[name] and true or false
end