diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-02-14 18:21:35 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-02-14 18:21:35 +0100 |
commit | cd404631d7079a9af603d173eb015f026731aa01 (patch) | |
tree | 588c6c8e860bb26955999dfc8be67eb78cc7ff7f /tex/context/base/mkxl/strc-lst.lmt | |
parent | d643b65f7ab840157f538914b07f8d3cddf94bec (diff) | |
download | context-cd404631d7079a9af603d173eb015f026731aa01.tar.gz |
2023-02-14 17:44:00
Diffstat (limited to 'tex/context/base/mkxl/strc-lst.lmt')
-rw-r--r-- | tex/context/base/mkxl/strc-lst.lmt | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/tex/context/base/mkxl/strc-lst.lmt b/tex/context/base/mkxl/strc-lst.lmt index 67e06520c..703e580d7 100644 --- a/tex/context/base/mkxl/strc-lst.lmt +++ b/tex/context/base/mkxl/strc-lst.lmt @@ -853,17 +853,46 @@ filters[v_component] = function(specification) return result end +-- filters[v_product] = function(specification) +-- local reference = specification.reference +-- if reference and reference ~= "" then +-- -- local utilitydata = job.loadother(reference,true) +-- local fullname = file.replacesuffix(reference,"tuc") +-- if lfs.isfile(fullname) then +-- local utilitydata = job.loadother(fullname) +-- if utilitydata then +-- local collected = utilitydata.structures.lists.collected or { } +-- setmetatableindex(collected,{ external = reference }) +-- return collected +-- end +-- end +-- end +-- return { } +-- end + filters[v_product] = function(specification) local reference = specification.reference if reference and reference ~= "" then --- local utilitydata = job.loadother(reference,true) + -- local utilitydata = job.loadother(reference,true) local fullname = file.replacesuffix(reference,"tuc") if lfs.isfile(fullname) then local utilitydata = job.loadother(fullname) if utilitydata then local collected = utilitydata.structures.lists.collected or { } setmetatableindex(collected,{ external = reference }) - return collected + local result = { } + local nofresult = 0 + local all = specification.all + local names = specification.names + for i=1,#collected do + local v = collected[i] + local m = v.metadata + if m and names[m.name] or all then + nofresult = nofresult + 1 + result[nofresult] = v + end + end + return result end end end |