diff options
author | Marius <mariausol@gmail.com> | 2013-10-20 01:20:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-10-20 01:20:14 +0300 |
commit | 965214d981e6129b782c67adcaf3a81aedcb0bac (patch) | |
tree | 84f5945aae8efc9b6eb1898b873be5453cafe43d /tex/context/base/lpdf-ano.lua | |
parent | e7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff) | |
download | context-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz |
stable 2013.05.28 00:36
Diffstat (limited to 'tex/context/base/lpdf-ano.lua')
-rw-r--r-- | tex/context/base/lpdf-ano.lua | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua index 3f0e718b3..adfea3812 100644 --- a/tex/context/base/lpdf-ano.lua +++ b/tex/context/base/lpdf-ano.lua @@ -12,6 +12,7 @@ if not modules then modules = { } end modules ['lpdf-ano'] = { local next, tostring = next, tostring local rep, format = string.rep, string.format +local texcount = tex.count local lpegmatch = lpeg.match local formatters = string.formatters @@ -51,8 +52,6 @@ local pdfannotation_node = nodepool.pdfannotation local pdfdestination_node = nodepool.pdfdestination local latelua_node = nodepool.latelua -local texgetcount = tex.getcount - local pdfdictionary = lpdf.dictionary local pdfarray = lpdf.array local pdfreference = lpdf.reference @@ -335,38 +334,13 @@ end -- runners and specials --- runners["inner"] = function(var,actions) --- if getinnermethod() == "names" then --- local vi = var.i --- if vi then --- local vir = vi.references --- if vir then --- local internal = vir.internal --- if internal then --- var.inner = "aut:" .. internal --- end --- end --- end --- else --- var.inner = nil --- end --- local prefix = var.p --- local inner = var.inner --- if inner and prefix and prefix ~= "" then --- inner = prefix .. ":" .. inner -- might not always be ok --- end --- return link(nil,nil,inner,var.r,actions) --- end - runners["inner"] = function(var,actions) - local internal = false if getinnermethod() == "names" then local vi = var.i if vi then local vir = vi.references if vir then - -- todo: no need for it when we have a real reference - internal = vir.internal + local internal = vir.internal if internal then var.inner = "aut:" .. internal end @@ -377,9 +351,8 @@ runners["inner"] = function(var,actions) end local prefix = var.p local inner = var.inner - if not internal and inner and prefix and prefix ~= "" then - -- no prefix with e.g. components - inner = prefix .. ":" .. inner + if inner and prefix and prefix ~= "" then + inner = prefix .. ":" .. inner -- might not always be ok end return link(nil,nil,inner,var.r,actions) end @@ -513,7 +486,7 @@ end function specials.deltapage(var,actions) local p = tonumber(var.operation) if p then - p = references.checkedrealpage(p + texgetcount("realpageno")) + p = references.checkedrealpage(p + texcount.realpageno) return link(nil,nil,nil,p,actions) end end |