diff options
Diffstat (limited to 'tex/context/base/mkxl/strc-ref.lmt')
-rw-r--r-- | tex/context/base/mkxl/strc-ref.lmt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt index 3c86d66d9..238201336 100644 --- a/tex/context/base/mkxl/strc-ref.lmt +++ b/tex/context/base/mkxl/strc-ref.lmt @@ -1014,6 +1014,7 @@ local function loadexternalreferences(name,utilitydata) local external = struc.references.collected -- direct references local lists = struc.lists.collected -- indirect references (derived) local pages = struc.pages.collected -- pagenumber data + local sections = struc.sections.collected -- a bit weird one, as we don't have the externals in the collected for prefix, set in next, external do if prefix == "" then @@ -1034,6 +1035,7 @@ local function loadexternalreferences(name,utilitydata) end end end + -- maybe store utilitydata in metatable so that we can access all for i=1,#lists do local entry = lists[i] local metadata = entry.metadata @@ -1049,6 +1051,15 @@ local function loadexternalreferences(name,utilitydata) if prefix == "" then prefix = name -- this can clash! end + local section = references.section + if section then + -- we have to make sure that the right section is used, see helpers.prefix + if sections then + references.sectiondata = sections[section] + else + -- warning + end + end local target = external[prefix] if not target then target = { } |