summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-syn.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-01-07 13:28:56 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-01-07 13:28:56 +0100
commitbcc5f422cb282c78b890ae719ac1a63eaa5e62aa (patch)
tree15ad5b0443d5ddff315eeee7426952930879a507 /tex/context/base/mkiv/node-syn.lua
parentb04dda4c73d0f71e78f1fd4979ef04c7e9a669ed (diff)
downloadcontext-bcc5f422cb282c78b890ae719ac1a63eaa5e62aa.tar.gz
2019-01-07 10:16:00
Diffstat (limited to 'tex/context/base/mkiv/node-syn.lua')
-rw-r--r--tex/context/base/mkiv/node-syn.lua25
1 files changed, 17 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index c9a7f6608..a00dc65ec 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -374,9 +374,15 @@ local function flushpostamble()
enabled = false
end
+local getpagedimensions getpagedimensions = function()
+ getpagedimensions = backends.codeinjections.getpagedimensions
+ return getpagedimensions()
+end
+
-- local function doaction(action,t,l,w,h,d)
+-- local pagewidth, pageheight = getpagedimensions()
-- local x, y = getpos()
--- filehandle:write(action(t,l,x,tex.pageheight-y,w,h,d))
+-- filehandle:write(action(t,l,x,pageheight-y,w,h,d))
-- nofobjects = nofobjects + 1
-- end
--
@@ -412,24 +418,27 @@ end
-- generic
--
-- local function doaction(t,l,w,h,d)
+-- local pagewidth, pageheight = getpagedimensions()
-- local x, y = getpos()
--- filehandle:write(f_hlist_1(t,l,x,tex.pageheight-y,w,h,d))
+-- filehandle:write(f_hlist_1(t,l,x,pageheight-y,w,h,d))
-- nofobjects = nofobjects + 1
-- end
local x_hlist do
local function doaction_1(t,l,w,h,d)
+ local pagewidth, pageheight = getpagedimensions()
local x, y = getpos()
- filehandle:write(f_hlist_1(t,l,x,tex.pageheight-y,w,h,d))
+ filehandle:write(f_hlist_1(t,l,x,pageheight-y,w,h,d))
nofobjects = nofobjects + 1
end
-- local lastx, lasty, lastw, lasth, lastd
--
-- local function doaction_2(t,l,w,h,d)
+ -- local pagewidth, pageheight = getpagedimensions()
-- local x, y = getpos()
- -- y = tex.pageheight-y
+ -- y = pageheight-y
-- filehandle:write(f_hlist_2(t,l,
-- x == lastx and "=" or x,
-- y == lasty and "=" or y,
@@ -446,8 +455,9 @@ local x_hlist do
local lasty = false
local function doaction_2(t,l,w,h,d)
+ local pagewidth, pageheight = getpagedimensions()
local x, y = getpos()
- y = tex.pageheight - y
+ y = pageheight - y
filehandle:write(f_hlist_2(t,l,x,y == lasty and "=" or y,w,h,d))
lasty = y
nofobjects = nofobjects + 1
@@ -673,10 +683,9 @@ function synctex.start()
writeanchor()
filehandle:write("{",nofsheets,eol)
-- this seems to work:
- local h = tex.pageheight
- local w = tex.pagewidth
+ local pagewidth, pageheight = getpagedimensions()
filehandle:write(z_hlist)
- filehandle:write(f_vlist_1(0,0,0,h,w,h,0))
+ filehandle:write(f_vlist_1(0,0,0,pageheight,pagewidth,pageheight,0))
end
end
end