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, 14 insertions, 29 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 3d553412815..5b73c972903 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua
@@ -41,39 +41,23 @@ function pages.mark(name,list)
local page = list[i]
local sign = false
if type(page) == "string" then
- 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
+ local s, p = match(page,"([%+%-])(%d+)")
+ if s then
+ sign, page = s, p
end
end
+ page = tonumber(page)
if page then
- 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
+ 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
end
end
@@ -91,6 +75,7 @@ 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