summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-31 23:45:28 +0000
committerKarl Berry <karl@freefriends.org>2016-01-31 23:45:28 +0000
commit326c162a7ec8088d104101b4739c727d824ae5f7 (patch)
treeb361de0cef7c47e209b56e053f1ec957a38526fb /Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
parenta05d0c546c309991c96cf6aed49902bf5d60f66c (diff)
luatexja (31jan16)
git-svn-id: svn://tug.org/texlive/trunk@39527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua13
1 files changed, 8 insertions, 5 deletions
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