diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua index bc6135e7242..a6799d80f1a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.lua @@ -835,14 +835,18 @@ function lists.getresult(r) end function lists.process(specification) - lists.result = filtercollected(specification) - local specials = settings_to_set(specification.extras or "") - specials = next(specials) and specials or nil - for i=1,#lists.result do - local r = lists.result[i] - local m = r.metadata - local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or "" - context.strclistsentryprocess(m.name,m.kind,i,s) + local result = filtercollected(specification) + local total = #result + lists.result = result + if total > 0 then + local specials = settings_to_set(specification.extras or "") + specials = next(specials) and specials or nil + for i=1,total do + local r = result[i] + local m = r.metadata + local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or "" + context.strclistsentryprocess(m.name,m.kind,i,s) + end end end @@ -1050,6 +1054,7 @@ implement { { "bookmark" }, { "marking" }, { "list" }, + { "reference" }, } }, { "prefixdata", { @@ -1212,7 +1217,7 @@ implement { implement { name = "doifelselisthastitle", actions = { lists.hastitledata, commands.doifelse }, arguments = { "string", "integer" } } implement { name = "doifelselisthaspage", actions = { lists.haspagedata, commands.doifelse }, arguments = { "string", "integer" } } implement { name = "doifelselisthasnumber", actions = { lists.hasnumberdata, commands.doifelse }, arguments = { "string", "integer" } } -implement { name = "doifelselisthasentry", actions = { lists.iscached, commands.doifelse }, arguments = { "integer" } } +implement { name = "doifelselisthasentry", actions = { lists.iscached, commands.doifelse }, arguments = "integer" } local function savedlisttitle(name,n,tag) local data = cached[tonumber(n)] @@ -1270,7 +1275,7 @@ implement { implement { name = "discardfromlist", actions = lists.discard, - arguments = { "integer" } + arguments = "integer" } -- new and experimental and therefore off by default |