Hello all,
It seems that with latest ConTeXt beta (with luatex 1.07.0) it seems that nuts.dimensions function behaviour has changed. Simple MWE shows the change.
Which function should be used now to get natural width of a range [n, t[ of nodes please?
Thanks a lot
Regards
Joseph Canedo
\startluacode
local nuts = nodes.nuts
local getdimensions = nuts.dimensions
local tonut = nuts.tonut
local tonode = nuts.tonode
local tasks = nodes.tasks
function handler(head)
head = tonut(head)
print('Width=' .. getdimensions(head, head)) // used to be 0 (as per luatex doc), now it’s most likely the natural width of the box.
return tonode(head)
end
tasks.appendaction("processors", "after", "handler")
tasks.enableaction("processors", "handler")
\stopluacode
\starttext
Foo.
\stoptext