From: Hironori Kitagawa Date: Sat, 31 Dec 2016 05:41:16 +0000 (+0900) Subject: Fix ticket #36913 X-Git-Tag: 20170109.0~6 X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=107ebba3ea5e77e8a9a502b8d874a9c0c86c71a3;p=luatex-ja%2Fluatexja.git Fix ticket #36913 --- diff --git a/src/lltjext.sty b/src/lltjext.sty index 02557dc..b814bbe 100644 --- a/src/lltjext.sty +++ b/src/lltjext.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjext}[2015/12/16 v1.2c-ltj-5 Macros for vertical writing] +\ProvidesPackage{lltjext}[2016/12/16 v1.2c-ltj-5 Macros for vertical writing] \RequirePackage{luatexja} {\catcode`\*=11 diff --git a/src/ltj-direction.lua b/src/ltj-direction.lua index 0947f34..5228662 100644 --- a/src/ltj-direction.lua +++ b/src/ltj-direction.lua @@ -106,14 +106,14 @@ do end end function get_dir_count() - for i=tex_nest.ptr, 1, -1 do - local h = tex_nest[i].head.next - if h then - local t = get_dir_count_inner(h) - if t~=0 then return t end - end - end - return page_direction + for i=tex_nest.ptr, 1, -1 do + local h = tex_nest[i].head.next + if h then + local t = get_dir_count_inner(h) + if t~=0 then return t end + end + end + return page_direction end function get_adjust_dir_count() for i=tex_nest.ptr, 1, -1 do @@ -951,6 +951,9 @@ do local list_dir = get_dir_count() local a = tex_nest[tex_nest.ptr].tail local ad = to_direct(a) + if (not a) or getid(ad)~=id_ins then + a = node.tail(tex.lists.page_head); ad = to_direct(a) + end if a and getid(ad)==id_ins then local h = getfield(ad, 'head') if getid(h)==id_whatsit and