diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua index b58040ac72a..640478d3499 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua @@ -38,8 +38,7 @@ local listcodes = nodes.listcodes local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist - -local linelist_code = listcodes.line +local line_code = listcodes.line local new_stretch = nodepool.stretch @@ -64,12 +63,13 @@ local nofrealigned = 0 -- raggedright 0 0 fil -- raggedcenter 0 + 0 + - -local function handler(head,leftpage,realpageno) -- traverse_list +local function handler(head,leftpage,realpageno) local current = head + local done = false while current do local id = getid(current) if id == hlist_code then - if getsubtype(current) == linelist_code then + if getsubtype(current) == line_code then local a = takeattr(current,a_realign) if not a or a == 0 then -- skip @@ -102,6 +102,7 @@ local function handler(head,leftpage,realpageno) -- traverse_list elseif trace_realign then report_realign("invalid flushing, align %a, page %a, realpage %a",align,pageno,realpageno) end + done = true nofrealigned = nofrealigned + 1 end end @@ -112,11 +113,14 @@ local function handler(head,leftpage,realpageno) -- traverse_list end current = getnext(current) end - return head + return head, done end function alignments.handler(head) - return handler(head,isleftpage(),texgetcount("realpageno")) + local leftpage = isleftpage() + local realpageno = texgetcount("realpageno") + local head, done = handler(tonut(head),leftpage,realpageno) + return tonode(head), done end local enabled = false |