summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-epa.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-11 01:23:08 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-11 01:23:08 +0200
commit1ef7a093aaf03b6327b3da94d47f53760c868c60 (patch)
tree228e6d4a5005598aaea191b3317c2fa21e22de75 /tex/context/base/mkiv/lpdf-epa.lua
parentb61d5dd3555e906b21601ff75b3268c0f359283e (diff)
downloadcontext-1ef7a093aaf03b6327b3da94d47f53760c868c60.tar.gz
2018-08-10 16:58:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-epa.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-epa.lua24
1 files changed, 16 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/lpdf-epa.lua b/tex/context/base/mkiv/lpdf-epa.lua
index 0792db646..1d0b9e8b2 100644
--- a/tex/context/base/mkiv/lpdf-epa.lua
+++ b/tex/context/base/mkiv/lpdf-epa.lua
@@ -28,6 +28,11 @@ local report_comment = logs.reporter("backend","comment")
local report_field = logs.reporter("backend","field")
local report_outline = logs.reporter("backend","outline")
+local lpdf = lpdf
+local epdf = epdf
+local backends = backends
+local context = context
+
local nodeinjections = backends.pdf.nodeinjections
local pdfarray = lpdf.array
@@ -45,15 +50,8 @@ local pdfcopyinteger = lpdf.copyinteger
local pdfcopystring = lpdf.copystring
local pdfcopyconstant = lpdf.copyconstant
-local pdfgetpos = lpdf.getpos
-
local hpack_node = nodes.hpack
-local epdf = epdf
-local backends = backends
-local lpdf = lpdf
-local context = context
-
local loadpdffile = lpdf.epdf.load
local nameonly = file.nameonly
@@ -74,6 +72,14 @@ local layerspec = { -- predefining saves time
"epdfcontent"
}
+-- can change:
+
+local pdfgetpos = lpdf.getpos
+
+updaters.register("backend.update",function()
+ pdfgetpos = lpdf.getpos
+end)
+
local collected = allocate()
local tobesaved = allocate()
@@ -313,7 +319,7 @@ function codeinjections.mergereferences(specification)
end
end
-- moved outside previous test
- context.setgvalue("figurereference",reference) -- global
+ context.setgvalue("figurereference",reference) -- global, todo: setmacro
if trace_links then
report_link("setting figure reference to %a",reference)
end
@@ -493,6 +499,8 @@ local validstamps = {
ForPublicRelease = true,
}
+-- todo: we can use runtoks instead of steps
+
local function validStamp(v)
local name = "Stamped" -- fallback
if v then