diff options
Diffstat (limited to 'tex/context/base/mkiv/node-aux.lua')
-rw-r--r-- | tex/context/base/mkiv/node-aux.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/node-aux.lua b/tex/context/base/mkiv/node-aux.lua index 5ac096f7c..4115530d4 100644 --- a/tex/context/base/mkiv/node-aux.lua +++ b/tex/context/base/mkiv/node-aux.lua @@ -445,6 +445,25 @@ function nodes.locate(start,wantedid,wantedsubtype) return found and tonode(found) end +local function rehpack(n,width) + local head = getlist(n) + local size = width or getfield(n,"width") + local temp = hpack_nodes(head,size,"exactly") + setfield(n,"width", size) + setfield(n,"glue_set", getfield(temp,"glue_set")) + setfield(n,"glue_sign", getfield(temp,"glue_sign")) + setfield(n,"glue_order",getfield(temp,"glue_order")) + setlist(temp) + free_node(temp) + return n +end + +nuts.rehpack = rehpack + +function nodes.rehpack(n,...) + rehpack(tonut(n),...) +end + -- I have no use for this yet: -- -- \skip0=10pt plus 2pt minus 2pt |