OSDN Git Service

Bug fix: baseline shift of a rule in math formula.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 7 Dec 2013 07:43:25 +0000 (16:43 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 7 Dec 2013 07:43:25 +0000 (16:43 +0900)
src/ltj-setwidth.lua

index 65da083..a3e9f23 100644 (file)
@@ -123,8 +123,11 @@ function set_ja_width(ahead, dir)
                   p.shift = p.shift + (has_attr(p,attr_yablshift) or 0)
                end
            elseif pid==id_rule then
-              local v = has_attr(p,attr_yablshift) or 0
-              p.height = p.height - v; p.depth = p.depth + v 
+              if (has_attr(p, attr_icflag) or 0) ~= PROCESSED then
+                 local v = has_attr(p,attr_yablshift) or 0
+                 p.height = p.height - v; p.depth = p.depth + v 
+                 set_attr(p, attr_icflag, PROCESSED + get_pr_begin_flag(p))
+              end
            end
         end
         p = node_next(p)