summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-ren.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-04-19 17:40:15 +0300
committerMarius <mariausol@gmail.com>2011-04-19 17:40:15 +0300
commit865b5da32dfab508db87744c7542a59c192dd459 (patch)
tree59d82bdb555d95cd5734743d9259662fd5c16c62 /tex/context/base/lpdf-ren.lua
parent930f95164ea82514ff24bf71c6baddd40a569766 (diff)
downloadcontext-865b5da32dfab508db87744c7542a59c192dd459.tar.gz
beta 2011.04.19 16:38
Diffstat (limited to 'tex/context/base/lpdf-ren.lua')
-rw-r--r--tex/context/base/lpdf-ren.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/tex/context/base/lpdf-ren.lua b/tex/context/base/lpdf-ren.lua
index 2fc1bf23c..742d42273 100644
--- a/tex/context/base/lpdf-ren.lua
+++ b/tex/context/base/lpdf-ren.lua
@@ -59,17 +59,22 @@ local textlayers, hidelayers, videlayers = pdfarray(), pdfarray(), pdfarray()
local pagelayers, pagelayersreference, cache = nil, nil, { }
local specifications = { }
+local initialized = { }
function codeinjections.defineviewerlayer(specification)
if viewerlayers.supported and textlayers then
- specifications[specification.tag] = specification
+ local tag = specification.tag
+ if not specifications[tag] then
+ specifications[tag] = specification
+ end
end
end
local function useviewerlayer(name)
local specification = specifications[name]
- if specification then
+ if not environment.initex and specification and not initialized[name] then
specifications[name] = nil -- or not
+ initialized [name] = true
if not pagelayers then
pagelayers = pdfdictionary()
pagelayersreference = pdfreserveobject()