OSDN Git Service

ltj-direction.lua: tex.lists.page_head is not always nil when a class file is loaded.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 29 Jun 2014 06:56:43 +0000 (15:56 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 29 Jun 2014 06:56:43 +0000 (15:56 +0900)
src/ltj-direction.lua
src/luatexja.lua

index c23f5ab..bd09165 100644 (file)
@@ -127,10 +127,12 @@ do
       else
         local w = (lv==0) and tex.lists.page_head or tex_nest[lv].head.next
         if w then
-           luatexja.ext_show_node_list(w, 'set_dir', print)
+           --luatexja.ext_show_node_list(w, 'set_dir', print)
            if (not w.next) and 
               w.id==id_whatsit and w.subtype==sid_user and w.user_id==DIR then
               node_set_attr(w, attr_dir, v)
+           elseif lv==0 and not page_direction then
+              page_direction = v -- for first call of \yoko (in luatexja-core.sty)
            else
               ltjb.package_error(
                  'luatexja',
index cba73a3..cd1595d 100644 (file)
@@ -478,7 +478,16 @@ local function debug_show_node_X(p,print_fn)
             debug_depth=k
          end
       else
-         s = s .. node.subtype(p.subtype); print_fn(s)
+         s = s .. node.subtype(p.subtype)
+        if p.subtype==1 then
+           s = s .. ' stream=' .. p.stream
+           print_fn(s)
+           for i=1,#p.data do
+              print_fn(base .. ' [' .. i .. '] = ' .. tostring(p.data[i]))
+           end
+        else
+           print_fn(s)
+        end
       end
    -------- math node --------
    elseif pt=='noad' then