From 326c162a7ec8088d104101b4739c727d824ae5f7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 31 Jan 2016 23:45:28 +0000 Subject: luatexja (31jan16) git-svn-id: svn://tug.org/texlive/trunk@39527 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua') diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua index a4f2ff2003a..a46fdeb99d2 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua @@ -141,6 +141,7 @@ do local STCK = luatexja.userid_table.STCK local IHB = luatexja.userid_table.IHB local sid_local = node.subtype('local_par') + local id_local = node.id('local_par') local function test_list(h, lv) if not h then @@ -161,7 +162,7 @@ do elseif ps~=sid_local then flag = 0; break end - else + elseif p.id~=id_local then flag = 0; break end end @@ -489,10 +490,12 @@ local function get_box_dir(b, default) local bh = getfield(b,'head') -- b は insert node となりうるので getlist() は使えない local c - for bh in traverse_id(id_whatsit, bh) do - if getsubtype(bh)==sid_user and getfield(bh, 'user_id')==DIR then - c = bh - dir = (dir==0) and has_attr(bh, attr_dir) or dir + if bh~=0 then -- bh != nil + for bh in traverse_id(id_whatsit, bh) do + if getsubtype(bh)==sid_user and getfield(bh, 'user_id')==DIR then + c = bh + dir = (dir==0) and has_attr(bh, attr_dir) or dir + end end end -- for i=1,2 do -- cgit v1.2.3