diff options
author | Marius <mariausol@gmail.com> | 2012-03-28 21:20:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-03-28 21:20:14 +0300 |
commit | e444ff22e3ee1c65be5c878511ac4cdd05b9552a (patch) | |
tree | 180df079cb28bc8b0a87aef98943511a7ec9386b /tex/context/base/file-job.lua | |
parent | 316e722df91407c48553d69c41bd982f9ba0f00f (diff) | |
download | context-e444ff22e3ee1c65be5c878511ac4cdd05b9552a.tar.gz |
beta 2012.03.28 18:39
Diffstat (limited to 'tex/context/base/file-job.lua')
-rw-r--r-- | tex/context/base/file-job.lua | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tex/context/base/file-job.lua b/tex/context/base/file-job.lua index d43efa232..992e4b7ec 100644 --- a/tex/context/base/file-job.lua +++ b/tex/context/base/file-job.lua @@ -402,11 +402,29 @@ end luatex.registerstopactions(logtree) -job.structure = job.structure or { } -job.structure.collected = job.structure.collected or { } -job.structure.tobesaved = root +job.structure = job.structure or { } +job.structure.collected = job.structure.collected or { } +job.structure.tobesaved = root +job.structure.components = { } + +local function initialize() + local function collect(root,result) + local branches = root.branches + if branches then + for i=1,#branches do + local branch = branches[i] + if branch.type == "component" then + result[#result+1] = branch.name + end + collect(branch,result) + end + end + return result + end + job.structure.components = collect(job.structure.collected,{}) +end -job.register('job.structure.collected',root) +job.register('job.structure.collected',root,initialize) -- component: small unit, either or not components itself -- product : combination of components |