summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
index 6915bcbef1d..aa97c7028b2 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
@@ -640,7 +640,7 @@ do
local bh = getlist(b)
local box_dir, dn = get_box_dir(b, ltjs.list_dir)
-- 既に b の中身にあるwhatsit
- if not dn then
+ if (box_dir<dir_node_auto) and (not dn) then
bh = create_dir_whatsit(bh, 'make_dir_whatsit', dir_yoko)
dn = bh; setfield(b, 'head', bh)
end
@@ -1105,6 +1105,11 @@ do
local finalize_inner
local function finalize_dir_node(db,new_dir)
local b = getlist(db)
+ if getid(b)==id_whatsit and getsubtype(b)==sid_user
+ and getfield(b, 'user_id')==DIR then
+ local ob = b; b = node_remove(b,b); setfield(db, 'head', b);
+ node_free(ob)
+ end
finalize_inner(b)
local w = getfield(b, 'width')
local h = getfield(b, 'height')