diff options
author | Marius <mariausol@gmail.com> | 2010-10-29 13:00:23 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-10-29 13:00:23 +0300 |
commit | 42c4d16ce1daa37425d12be6c87d6f64a72b5094 (patch) | |
tree | 494b8c10ccef29abe26db9acf08261ce78c16cf6 /tex/context/base/strc-ref.lua | |
parent | f56f0054360a9bdfb57de9abcf0d81a2766c22b9 (diff) | |
download | context-42c4d16ce1daa37425d12be6c87d6f64a72b5094.tar.gz |
beta 2010.10.29 11:35
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r-- | tex/context/base/strc-ref.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 459cbb9bb..3dddc6bc5 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -552,11 +552,12 @@ function exporters.lists.generic(data) end if numberdata then local numbers = numberdata.numbers - local t = { } + local t, tn = { }, 0 for i=1,#numbers do local n = numbers[i] if n ~= 0 then - t[#t+1] = n + tn = tn + 1 + t[tn] = n end end useddata.number = concat(t,".") @@ -1162,21 +1163,23 @@ function references.setinternalreference(prefix,tag,internal,view) if innermethod == "page" then return unsetvalue else - local t = { } -- maybe add to current + local t, tn = { }, 0 -- maybe add to current if tag then if prefix and prefix ~= "" then prefix = prefix .. ":" for ref in gmatch(tag,"[^,]+") do - t[#t+1] = prefix .. ref + tn = tn + 1 + t[tn] = prefix .. ref end else for ref in gmatch(tag,"[^,]+") do - t[#t+1] = ref + tn = tn + 1 + t[tn] = ref end end end if internal and innermethod == "names" then -- mixed or page - t[#t+1] = "aut:" .. internal + t[tn] = "aut:" .. internal end local destination = references.mark(t,nil,nil,view) -- returns an attribute texcount.lastdestinationattribute = destination |