summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24314 -> 24743 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin236799 -> 257235 bytes
-rw-r--r--tex/context/base/mkiv/strc-lst.lua51
5 files changed, 43 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 98dbc868f..383351dd3 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.12.24 19:07}
+\newcontextversion{2021.12.25 00:55}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index bc37c8aab..3d9e02e03 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.24 19:07}
+\edef\contextversion{2021.12.25 00:55}
%D Kind of special:
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 64c9917b6..94dd23ff5 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 38d788622..a9934cf42 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-lst.lua b/tex/context/base/mkiv/strc-lst.lua
index a6799d80f..96ad7c8ed 100644
--- a/tex/context/base/mkiv/strc-lst.lua
+++ b/tex/context/base/mkiv/strc-lst.lua
@@ -445,7 +445,8 @@ local function filtercollected(specification)
elseif not wantedcriterium then
block = documents.data.block
else
- block, criterium = wantedblock, wantedcriterium
+ block = wantedblock
+ criterium = wantedcriterium
end
if block == "" then
block = false
@@ -468,6 +469,10 @@ local function filtercollected(specification)
specification.block = block
specification.all = all
--
+ if specification.atmost then
+ criterium = v_text
+ end
+ --
if trace_lists then
report_lists("filtering names %,t, criterium %a, block %a",sortedkeys(names), criterium, block or "*")
end
@@ -476,6 +481,31 @@ local function filtercollected(specification)
report_lists("criterium %a, block %a, found %a",specification.criterium, specification.block or "*", #result)
end
--
+ local levels = tonumber(specification.levels)
+ if levels then
+ local minlevel = 1000
+ local found = result
+ local nofresult = #result
+ for i=1,nofresult do
+ local v = found[i]
+ local l = v.metadata.level or 1
+ if l < minlevel then
+ minlevel = l
+ end
+ end
+ local maxlevel = minlevel + levels - 1
+ result = { }
+ nofresult = 0
+ for i=1,#found do
+ local v = found[i]
+ local l = v.metadata.level or 1
+ if l >= minlevel and l <= maxlevel then
+ nofresult = nofresult + 1
+ result[nofresult] = v
+ end
+ end
+ end
+ --
if sortorder then -- experiment
local sorter = listsorters[sortorder]
if sorter then
@@ -495,7 +525,7 @@ end
filters[v_intro] = function(specification)
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local all = specification.all
local names = specification.names
for i=1,#collected do
@@ -515,7 +545,7 @@ end
filters[v_reference] = function(specification)
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local names = specification.names
local sections = sections.collected
local reference = specification.reference
@@ -554,7 +584,7 @@ end
filters[v_all] = function(specification)
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local block = specification.block
local all = specification.all
local forced = specification.forced
@@ -566,7 +596,7 @@ filters[v_all] = function(specification)
if r and (not block or not r.block or block == r.block) then
local metadata = v.metadata
if metadata then
- local name = metadata.name or false
+ local name = metadata.name or false
local sectionnumber = (r.section == 0) or sections[r.section]
if forced[name] or (sectionnumber and not metadata.nolist and (all or names[name])) then -- and not sectionnumber.hidenumber then
nofresult = nofresult + 1
@@ -588,7 +618,7 @@ filters[v_current] = function(specification)
end
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local depth = specification.depth
local block = specification.block
local all = specification.all
@@ -634,7 +664,7 @@ filters[v_here] = function(specification)
end
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local depth = specification.depth
local block = specification.block
local all = specification.all
@@ -679,7 +709,7 @@ filters[v_previous] = function(specification)
end
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local block = specification.block
local all = specification.all
local names = specification.names
@@ -740,7 +770,7 @@ filters[v_component] = function(specification)
-- special case, no structure yet
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
local all = specification.all
local names = specification.names
local component = resolvers.jobs.currentcomponent() or ""
@@ -766,7 +796,7 @@ end
filters[v_default] = function(specification) -- is named
local collected = specification.collected
local result = { }
- local nofresult = #result
+ local nofresult = 0
----- depth = specification.depth
local block = specification.block
local criterium = specification.criterium
@@ -1111,6 +1141,7 @@ implement {
{ "reference" },
{ "extras" },
{ "order" },
+ { "levels" },
}
}
}