summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/strc-lst.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/strc-lst.lua')
-rw-r--r--tex/context/base/mkiv/strc-lst.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/strc-lst.lua b/tex/context/base/mkiv/strc-lst.lua
index 2e8eb15d9..865c44624 100644
--- a/tex/context/base/mkiv/strc-lst.lua
+++ b/tex/context/base/mkiv/strc-lst.lua
@@ -990,6 +990,18 @@ function lists.hasnumberdata(name,n)
return false
end
+function lists.rawnumber(n,name)
+ local data = lists.result[n]
+ if data then
+ local numberdata = data.numberdata
+ if numberdata then
+ numberdata = numberdata.numbers
+ return numberdata and numberdata[getsectionlevel(name)] or numberdata[name] or 0
+ end
+ end
+ return 0
+end
+
function lists.prefix(name,n,spec)
helpers.prefix(lists.result[n],spec)
end
@@ -1327,6 +1339,12 @@ implement {
arguments = "integer"
}
+implement {
+ name = "rawlistnumber",
+ actions = { lists.rawnumber, context },
+ arguments = { "integer", "string" },
+}
+
-- new and experimental and therefore off by default
lists.autoreorder = false -- true