From c0e2193b6c379b34fbc589343d31f71e02513f03 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 28 Oct 2021 11:38:54 +0200 Subject: 2021-10-28 10:19:00 --- tex/context/base/mkxl/node-tsk.lmt | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'tex/context/base/mkxl/node-tsk.lmt') 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,...) +]], + + } +} -- cgit v1.2.3