summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/node-tsk.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-10-28 11:38:54 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-10-28 11:38:54 +0200
commitc0e2193b6c379b34fbc589343d31f71e02513f03 (patch)
tree78e2d71def3ce80cf233c79279dcfddaac18a523 /tex/context/base/mkxl/node-tsk.lmt
parenta23982bf3c6cc3c7e34c89a67004e2ef4c6103eb (diff)
downloadcontext-c0e2193b6c379b34fbc589343d31f71e02513f03.tar.gz
2021-10-28 10:19:00
Diffstat (limited to 'tex/context/base/mkxl/node-tsk.lmt')
-rw-r--r--tex/context/base/mkxl/node-tsk.lmt52
1 files changed, 52 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/node-tsk.lmt b/tex/context/base/mkxl/node-tsk.lmt
index 61e5bc0d4..c12c9597e 100644
--- a/tex/context/base/mkxl/node-tsk.lmt
+++ b/tex/context/base/mkxl/node-tsk.lmt
@@ -952,3 +952,55 @@ nonut = [[
--
-- }
-- }
+
+-- -- localboxes -- --
+
+tasks.new {
+ name = "localboxes",
+ processor = nodeprocessor,
+ sequence = {
+ "before", -- for users
+ "lists",
+ "after", -- for users
+ },
+ templates = {
+
+default = [[
+return function(head)
+end
+]],
+
+process = [[
+local tonut = nodes.tonut
+local tonode = nodes.nuts.tonode
+
+%localize%
+
+-- line,leftbox,rightbox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parfillleftskip,parfillrightskip
+
+return function(line,leftbox,rightbox,...)
+ nutline = tonut(line)
+ nutleftbox = leftbox and tonut(leftbox)
+ nutrightbox = rightbox and tonut(rightbox)
+%actions%
+end
+]],
+
+step = [[
+ tonut((%action%(line,leftbox,rightbox,...)))
+]],
+
+nut = [[
+ %action%(nutline,nutleftbox,nutrightbox,...)
+]],
+
+nohead = [[
+ %action%(line,leftbox,rightbox,...)
+]],
+
+nonut = [[
+ %action%(nutline,nutleftbox,nutrightbox,...)
+]],
+
+ }
+}