diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
commit | 974640d66e61e81cb197ad96fdff7b08343e4c5a (patch) | |
tree | 2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkiv/page-ini.lua | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
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.lua | 17 |
1 files changed, 15 insertions, 2 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 17f4c44dadd..924e01b2aa8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/page-ini.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['page-ini'] = { local tonumber, rawget, rawset, type, next = tonumber, rawget, rawset, type, next local match = string.match -local sort, tohash, insert, remove = table.sort, table.tohash, table.insert, table.remove +local sort, tohash, insert, remove, sortedkeys = table.sort, table.tohash, table.insert, table.remove, table.sortedkeys local settings_to_array, settings_to_hash = utilities.parsers.settings_to_array, utilities.parsers.settings_to_hash local texgetcount = tex.getcount @@ -87,10 +87,23 @@ function pages.mark(name,list) end end +local tobemarked = { } + +function pages.markedlist(realpage) + if realpage then + local m = rawget(tobemarked,realpage) or rawget(data,realpage) + return m and next(m) and sortedkeys(m) + end +end + local function marked(name) local realpage = texgetcount("realpageno") for i=last,realpage-1 do - rawset(data,i,nil) + local di = data[i] + if di then + tobemarked[i] = di + rawset(data,i,nil) + end end local pagedata = rawget(data,realpage) return pagedata and pagedata[name] and true or false |