diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/lpdf-nod.lua | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lpdf-nod.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lpdf-nod.lua | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/lpdf-nod.lua b/Master/texmf-dist/tex/context/base/lpdf-nod.lua index 0ae9001232a..39bba2d6364 100644 --- a/Master/texmf-dist/tex/context/base/lpdf-nod.lua +++ b/Master/texmf-dist/tex/context/base/lpdf-nod.lua @@ -8,9 +8,13 @@ if not modules then modules = { } end modules ['lpdf-nod'] = { local copy_node, new_node = node.copy, node.new -local pdfliteral = nodes.register(new_node("whatsit", 8)) pdfliteral.mode = 1 -local pdfdest = nodes.register(new_node("whatsit",19)) pdfdest.named_id = 1 -- xyz_zoom untouched -local pdfannot = nodes.register(new_node("whatsit",15)) +local nodepool = nodes.pool + +local register = nodepool.register + +local pdfliteral = register(new_node("whatsit", 8)) pdfliteral.mode = 1 +local pdfdest = register(new_node("whatsit",19)) pdfdest.named_id = 1 -- xyz_zoom untouched +local pdfannot = register(new_node("whatsit",15)) local variables = interfaces.variables @@ -25,13 +29,20 @@ local views = { -- beware, we do support the pdf keys but this is *not* official fitr = 7, } -function nodes.pdfliteral(str) +function nodepool.pdfliteral(str) + local t = copy_node(pdfliteral) + t.data = str + return t +end + +function nodepool.pdfdirect(str) local t = copy_node(pdfliteral) t.data = str + t.mode = 1 return t end -function nodes.pdfannotation(w,h,d,data,n) +function nodepool.pdfannotation(w,h,d,data,n) local t = copy_node(pdfannot) if w and w ~= 0 then t.width = w end if h and h ~= 0 then t.height = h end @@ -41,7 +52,7 @@ function nodes.pdfannotation(w,h,d,data,n) return t end -function nodes.pdfdestination(w,h,d,name,view,n) +function nodepool.pdfdestination(w,h,d,name,view,n) local t = copy_node(pdfdest) if w and w ~= 0 then t.width = w end if h and h ~= 0 then t.height = h end |