diff options
Diffstat (limited to 'tex/context/base/lpdf-epa.lua')
-rw-r--r-- | tex/context/base/lpdf-epa.lua | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/tex/context/base/lpdf-epa.lua b/tex/context/base/lpdf-epa.lua index 93e494a31..dc7cef310 100644 --- a/tex/context/base/lpdf-epa.lua +++ b/tex/context/base/lpdf-epa.lua @@ -35,17 +35,21 @@ local function makenamespace(filename) end local function add_link(x,y,w,h,destination,what) + x = x .. "bp" + y = y .. "bp" + w = w .. "bp" + h = h .. "bp" if trace_links then - report_link("dx: % 4i, dy: % 4i, wd: % 4i, ht: % 4i, destination: %s, type: %s",x,y,w,h,destination,what) + report_link("destination %a, type %a, dx %s, dy %s, wd %s, ht %s",destination,what,x,y,w,h) end local locationspec = { -- predefining saves time - x = x .. "bp", - y = y .. "bp", + x = x, + y = y, preset = "leftbottom", } local buttonspec = { - width = w .. "bp", - height = h .. "bp", + width = w, + height = h, offset = variables.overlay, frame = trace_links and variables.on or variables.off, } @@ -152,23 +156,23 @@ function codeinjections.mergereferences(specification) elseif linktype == "URI" then link_uri(x,y,w,h,document,annotation) elseif trace_links then - report_link("unsupported link annotation %q",linktype) + report_link("unsupported link annotation %a",linktype) end else report_link("mising link annotation") end elseif trace_links then - report_link("unsupported annotation %q",subtype) + report_link("unsupported annotation %a",subtype) end elseif trace_links then - report_link("broken annotation, index: %i",i) + report_link("broken annotation, index %a",i) end end context.flushlayer { "epdflinks" } -- context("\\gdef\\figurereference{%s}",reference) -- global context.setgvalue("figurereference",reference) -- global if trace_links then - report_link("setting figure reference to %q",reference) + report_link("setting figure reference to %a",reference) end specification.reference = reference return namespace @@ -200,7 +204,7 @@ function codeinjections.mergeviewerlayers(specification) local tag = namespace .. gsub(layer," ",":") local title = tag if trace_links then - report_link("using layer %q",tag) + report_link("using layer %a",tag) end attributes.viewerlayers.define { -- also does some cleaning tag = tag, -- todo: #3A or so @@ -211,7 +215,7 @@ function codeinjections.mergeviewerlayers(specification) } codeinjections.useviewerlayer(tag) elseif trace_links then - report_link("broken layer, index: %i",i) + report_link("broken layer, index %a",i) end end end |