summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-lst.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-01-05 19:27:33 +0100
committerHans Hagen <pragma@wxs.nl>2012-01-05 19:27:33 +0100
commitf784af77ded9f791caa3cdb7864d6696de61bca6 (patch)
treedbfbeb3acaefb57568da09170608d1e1e9ef522c /tex/context/base/strc-lst.lua
parent33ae9293e4496c79b47ba7c4b8d2eca9befc91e9 (diff)
downloadcontext-f784af77ded9f791caa3cdb7864d6696de61bca6.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)