From: Hironori Kitagawa Date: Sun, 29 Jun 2014 06:56:43 +0000 (+0900) Subject: ltj-direction.lua: tex.lists.page_head is not always nil when a class file is loaded. X-Git-Tag: 20150420.0~174 X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=0557243ff96895d136c074c13f9555980e1e8fd5;hp=-c;p=luatex-ja%2Fluatexja.git ltj-direction.lua: tex.lists.page_head is not always nil when a class file is loaded. --- 0557243ff96895d136c074c13f9555980e1e8fd5 diff --git a/src/ltj-direction.lua b/src/ltj-direction.lua index c23f5ab..bd09165 100644 --- a/src/ltj-direction.lua +++ b/src/ltj-direction.lua @@ -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', diff --git a/src/luatexja.lua b/src/luatexja.lua index cba73a3..cd1595d 100644 --- a/src/luatexja.lua +++ b/src/luatexja.lua @@ -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