OSDN Git Service

Fix ticket #33061.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 2 Feb 2014 05:29:33 +0000 (14:29 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 2 Feb 2014 05:29:33 +0000 (14:29 +0900)
src/ltj-math.lua
src/luatexja.lua

index 04b5b92..cb1c669 100644 (file)
@@ -106,8 +106,8 @@ function (p, sty)
    else
       local pid = getid(p)
       if pid == id_sub_mlist then
-         if getlist(p) then
-            setfield(p, 'head', conv_jchar_to_hbox(getlist(p), sty))
+         if getfield(p, 'head') then
+            setfield(p, 'head', conv_jchar_to_hbox(getfield(p, 'head'), sty))
          end
       elseif pid == id_mchar then
          local fam = has_attr(p, attr_jfam) or -1
index f99d076..153bd7a 100644 (file)
@@ -378,11 +378,9 @@ local function debug_show_node_X(p,print_fn)
       if get_attr_icflag(p) == icflag_table.PACKED then
          s = s .. ' (packed)'
       end
-      print_fn(s)
-      local q = p.head
-      debug_depth=debug_depth.. '.'
-      while q do 
-         debug_show_node_X(q, print_fn); q = node_next(q)
+      print_fn(s); debug_depth=debug_depth.. '.'
+      for q in node.traverse(p.head) do
+         debug_show_node_X(q, print_fn)
       end
       debug_depth=k
    elseif pt == 'glue' then
@@ -454,10 +452,13 @@ local function debug_show_node_X(p,print_fn)
    elseif pt=='math_char' then
       s = base .. ' fam: ' .. p.fam .. ' , char = ' .. utf.char(p.char)
       print_fn(s)
-   elseif pt=='sub_box' then
+   elseif pt=='sub_box' or pt=='sub_mlist' then
       print_fn(base)
       if p.head then
-         debug_depth = k .. '.'; debug_show_node_X(p.head, print_fn); 
+         debug_depth = k .. '.'; 
+        for q in node.traverse(p.head) do
+           debug_show_node_X(q, print_fn)
+        end
       end
    else
       print_fn(base)