From a16a68418d3acc0cfa13b8e5a5409263e4c2fedb Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 18 Jan 2022 11:52:31 +0100 Subject: 2022-01-18 10:51:00 --- tex/context/base/mkxl/node-aux.lmt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tex/context/base/mkxl/node-aux.lmt') diff --git a/tex/context/base/mkxl/node-aux.lmt b/tex/context/base/mkxl/node-aux.lmt index 5915f5985..a640addc1 100644 --- a/tex/context/base/mkxl/node-aux.lmt +++ b/tex/context/base/mkxl/node-aux.lmt @@ -385,3 +385,38 @@ end function nodes.hpack(h,...) return tonode(hpack_nodes(tonut(h),...)) end function nodes.vpack(h,...) return tonode(vpack_nodes(tonut(h),...)) end + +-- + +local report_slide = logs.reporter("nodes", "slide") + +function nuts.checkslide(head,banner) + local c = head + local x = nil + local b = false + while c do + local p, n = getboth(c) + if p and p ~= x then + b = true + end + x = c + c = n + end + if b then + report_slide("") + report_slide(banner or "?") + report_slide("") + c = head + x = nil + while c do + local p, n = getboth(c) + report_slide("%s %s",(p and p ~= x and "!") or " ",tostring(tonode(c))) + x = c + c = getnext(c) + end + report_slide("") + nuts.show(head) + report_slide("") + nuts.slide(head) + end +end -- cgit v1.2.3