OSDN Git Service

fix #36633
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 10 Sep 2016 08:39:05 +0000 (17:39 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 10 Sep 2016 08:39:05 +0000 (17:39 +0900)
src/ltj-setwidth.lua
src/luatexja.lua

index 9202858..9c783a5 100644 (file)
@@ -107,7 +107,7 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir)
         setfield(box, 'depth', fdepth + kbl)
         setfield(box, 'dir', dir)
         set_attr(box, attr_icflag, PACKED)
-        --set_attr(p, attr_icflag, PACKED)
+        set_attr(p, attr_icflag, PROCESSED)
         head = p and node_insert_before(head, p, box)
            or node_insert_after(head, node_tail(head), box)
         return node_next(p), head, p, box
@@ -219,7 +219,7 @@ function luatexja.setwidth.apply_ashift_math(head, last, attr_ablshift)
         return
       elseif (has_attr(p, attr_icflag) or 0) ~= PROCESSED then
         if pid==id_hlist or pid==id_vlist then
-           setfield(p, 'shift', getfield(p, 'shift') +  (has_attr(p,attr_ablshift) or 0))
+           setfield(p, 'shift', getfield(p, 'shift') +  (has_attr(p,attr_ablshift) or 0)) 
         elseif pid==id_rule then
            local v = has_attr(p,attr_ablshift) or 0
            setfield(p, 'height', getfield(p, 'height')-v)
@@ -231,6 +231,7 @@ function luatexja.setwidth.apply_ashift_math(head, last, attr_ablshift)
            setfield(p, 'yoffset',
                     getfield(p, 'yoffset') - (has_attr(p,attr_ablshift) or 0))
         end
+         set_attr(p, attr_icflag, PROCESSED)
       end
    end
 end
index a85e089..b966e83 100644 (file)
@@ -408,7 +408,8 @@ local function debug_show_node_X(p,print_fn, limit)
          .. tostring(p.font)
          .. ' (' .. print_scaled(p.height) .. '+'
          .. print_scaled(p.depth) .. ')x' .. print_scaled(p.width)
-         .. ' xoff: ' .. print_scaled(p.xoffset)
+         .. ' off: (' .. print_scaled(p.xoffset)
+         .. ',' .. print_scaled(p.yoffset) .. ')'
       print_fn(s)
    elseif pt=='hlist' or pt=='vlist' or pt=='unset'or pt=='ins' then
       if pt=='ins' then