diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-10-03 12:59:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-10-03 12:59:00 +0200 |
commit | 79d53c0a828babfb0935f98aee0fd82a39dbd220 (patch) | |
tree | 715351fc2a57f8247ed83378b32f172c15dff2e4 /tex/context/base/strc-ref.lua | |
parent | 6cac96268d51a0eb798d5971107cacd71bc4f955 (diff) | |
download | context-79d53c0a828babfb0935f98aee0fd82a39dbd220.tar.gz |
beta 2011.10.03 12:59
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r-- | tex/context/base/strc-ref.lua | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 8e3a3db82..da0549bb9 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -389,13 +389,6 @@ references.files.data = references.files.data or { } local files = references.files.data -table.setmetatableindex(files, function(t,k) - -- we assume that it's a file anyway - local v = { k, k } - files[k] = v - return v -end) - function references.files.define(name,file,description) if name and name ~= "" then files[name] = { file or "", description or file or "" } @@ -711,8 +704,19 @@ local function loadexternalreferences(name,utilitydata) end end +local externalfiles = { } + +table.setmetatableindex(externalfiles, function(t,k) + local v = files[k] + if not v then + v = { k, k } + end + externalfiles[k] = v + return v +end) + table.setmetatableindex(externals,function(t,k) -- either or not automatically - local filename = files[k][1] -- filename + local filename = externalfiles[k][1] -- filename local fullname = file.replacesuffix(filename,"tuc") if lfs.isfile(fullname) then -- todo: use other locator local utilitydata = job.loadother(fullname) |