diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-01-15 14:50:04 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-01-15 14:50:04 +0100 |
commit | 0caec226a633182402b349c3ac5b3bf9e0bc76c2 (patch) | |
tree | 30524574e0b41eb771f5f9af8cadc60354652aa3 /tex/context/base/mkxl/strc-ref.lmt | |
parent | 659b8f28e591006b6d0669c05d809d6ccf60cec0 (diff) | |
download | context-0caec226a633182402b349c3ac5b3bf9e0bc76c2.tar.gz |
2023-01-15 13:55:00
Diffstat (limited to 'tex/context/base/mkxl/strc-ref.lmt')
-rw-r--r-- | tex/context/base/mkxl/strc-ref.lmt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt index 32c2a5429..3c86d66d9 100644 --- a/tex/context/base/mkxl/strc-ref.lmt +++ b/tex/context/base/mkxl/strc-ref.lmt @@ -1274,8 +1274,9 @@ function references.loadpresets(product,component) -- we can consider a special if product and component and product~= "" and component ~= "" and not productdata.product then -- maybe: productdata.filename ~= filename productdata.product = product productdata.component = component + -- todo: use other locator local fullname = file.replacesuffix(product,"tuc") - if lfs.isfile(fullname) then -- todo: use other locator + if lfs.isfile(fullname) then local utilitydata = job.loadother(fullname) if utilitydata then if trace_importing then @@ -1311,7 +1312,7 @@ if useproduct then implement { name = "useproduct", actions = newuseproduct, - arguments = "string", + arguments = "optional", overload = true, } @@ -2243,7 +2244,13 @@ local function filterreference(name,prefixspec,numberspec) -- number page title local cs = references.analyze() -- normally already analyzed but also sets state context(tonumber(cs.realpage) or 0) else -- assumes data is table - local kind = type(data) == "table" and data.metadata and data.metadata.kind + local kind = false + if type(data) == "string" then + -- todo + end + if type(data) == "table" then + kind = data.metadata and data.metadata.kind + end if kind then local filter = filters[kind] or genericfilters filter = filter and (filter[name] or filter.unknown or genericfilters[name] or genericfilters.unknown) |