summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-lst.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-11-25 13:00:14 +0200
committerMarius <mariausol@gmail.com>2011-11-25 13:00:14 +0200
commit3c93a961f9579bc10a8a6cb0d30065d9791048a3 (patch)
tree6252a6f9ffcc5688ca62c7de94135f74b8ca11dc /tex/context/base/strc-lst.lua
parent8a9434e331825735e636700d6a509cf770d5ec41 (diff)
downloadcontext-3c93a961f9579bc10a8a6cb0d30065d9791048a3.tar.gz
beta 2011.11.25 11:31
Diffstat (limited to 'tex/context/base/strc-lst.lua')
-rw-r--r--tex/context/base/strc-lst.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index d96a4a9ea..ed0049081 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -230,7 +230,7 @@ local sorters = {
end,
}
--- some day soon we will pass a table
+-- some day soon we will pass a table .. also split the function
local function filtercollected(names, criterium, number, collected, forced, nested, sortorder) -- names is hash or string
local numbers, depth = documents.data.numbers, documents.data.depth
@@ -393,6 +393,20 @@ local function filtercollected(names, criterium, number, collected, forced, nest
else
return filtercollected(names,variables.current,number,collected,forced,false,sortorder)
end
+ elseif criterium == variables.component then
+ -- special case, no structure yet
+ local component = resolvers.jobs.currentcomponent() or ""
+ if component ~= "" then
+ for i=1,#collected do
+ local v = collected[i]
+ local r = v.references
+ local m = v.metadata
+ if r and r.component == component and (m and names[m.name] or all) then
+ nofresult = nofresult + 1
+ result[nofresult] = v
+ end
+ end
+ end
else -- sectionname, number
-- not the same as register
local depth = sections.getlevel(criterium)