summaryrefslogtreecommitdiff
path: root/tex/context/base/page-pst.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/page-pst.lua')
-rw-r--r--tex/context/base/page-pst.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/tex/context/base/page-pst.lua b/tex/context/base/page-pst.lua
index f714c25d9..2fc400a14 100644
--- a/tex/context/base/page-pst.lua
+++ b/tex/context/base/page-pst.lua
@@ -8,12 +8,16 @@ if not modules then modules = { } end modules ['page-pst'] = {
-- todo: adapt message
+local tonumber, next = tonumber, next
local format, validstring = string.format, string.valid
local sortedkeys = table.sortedkeys
local context = context
local commands = commands
+local texgetcount = tex.getcount
+local texsetcount = tex.setcount
+
local cache = { }
local function flush(page)
@@ -35,14 +39,14 @@ local function setnextpage()
elseif n > 0 then
-- upcoming page (realpageno)
end
- tex.setcount("global","c_page_postponed_blocks_next_page",n)
+ texsetcount("global","c_page_postponed_blocks_next_page",n)
end
function commands.flushpostponedblocks(page)
-- we need to flush previously pending pages as well and the zero
-- slot is the generic one so that one is always flushed
local t = sortedkeys(cache)
- local p = tonumber(page) or tex.count.realpageno or 0
+ local p = tonumber(page) or texgetcount("realpageno") or 0
for i=1,#t do
local ti = t[i]
if ti <= p then
@@ -57,7 +61,7 @@ end
function commands.registerpostponedblock(page)
if type(page) == "string" then
if string.find(page,"^+") then
- page = tex.count.realpageno + (tonumber(page) or 1) -- future delta page
+ page = texgetcount("realpageno") + (tonumber(page) or 1) -- future delta page
else
page = tonumber(page) or 0 -- preferred page or otherwise first possible occasion
end