diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-13 18:16:16 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-13 18:16:16 +0200 |
commit | 9db0c39e07509226287ef0075dfda8d2386416ed (patch) | |
tree | 6daf69803dd8c7cc1eadfeebe65653de6c4a23c1 /tex/context/base/mkiv/node-aux.lua | |
parent | 5baf21b979124606cb6503be4e16d403f233ecd4 (diff) | |
download | context-9db0c39e07509226287ef0075dfda8d2386416ed.tar.gz |
2016-06-13 17:04:00
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 |