- if p.id==id_hlist or p.id==id_vlist then
- p.shift = p.shift + (has_attr(p,attr_yablshift) or 0)
- elseif p.id==id_rule then
- local v = has_attr(p,attr_yablshift) or 0
- p.height = p.height - v; p.depth = p.depth + v
+ -- 数式の位置補正
+ if pid==id_hlist or pid==id_vlist then
+ if (has_attr(p, attr_icflag) or 0) ~= PROCESSED then
+ p.shift = p.shift + (has_attr(p,attr_yablshift) or 0)
+ end
+ elseif pid==id_rule then
+ 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