summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-ano.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-08-22 18:35:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-08-22 18:35:00 +0200
commit59ba8ee162a46adb0b41a4255c2aab552e5a8b31 (patch)
tree3ce84c2116350e401e3ea2d99873709cd40d4d49 /tex/context/base/lpdf-ano.lua
parenta8e81e5eab3d41a14e5bc9a8a6f0345bbea1a0e2 (diff)
downloadcontext-59ba8ee162a46adb0b41a4255c2aab552e5a8b31.tar.gz
beta 2009.08.22 18:35
Diffstat (limited to 'tex/context/base/lpdf-ano.lua')
-rw-r--r--tex/context/base/lpdf-ano.lua25
1 files changed, 23 insertions, 2 deletions
diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua
index 87014365b..e22353b7c 100644
--- a/tex/context/base/lpdf-ano.lua
+++ b/tex/context/base/lpdf-ano.lua
@@ -337,7 +337,7 @@ end
function specials.url(var,actions)
local url = var.operation
if url then
- local u = jobreferences.urls[url]
+ local u = jobreferences.urls.data[url]
if u then
local u, f = u[1], u[2]
if f and f ~= "" then
@@ -353,7 +353,7 @@ end
function specials.file(var,actions)
local file = var.operation
if file then
- local f = jobreferences.files[file]
+ local f = jobreferences.files.data[file]
if f then
file = f[1] or file
end
@@ -361,6 +361,27 @@ function specials.file(var,actions)
return link(nil,file,var.arguments,nil,actions)
end
+function specials.fileorurl(var,actions)
+ local whatever, url, file = var.operation, nil, nil
+ if whatever then
+ local w = jobreferences.files.data[whatever]
+ if w then
+ file = w[1]
+ else
+ w = jobreferences.urls.data[whatever]
+ if w then
+ local u, f = w[1], w[2]
+ if f and f ~= "" then
+ url = u .. "/" .. f
+ else
+ url = u
+ end
+ end
+ end
+ end
+ return link(url,file,var.arguments,nil,actions)
+end
+
function specials.program(var,content)
local program = var.operation
if program then