From: Hironori Kitagawa Date: Thu, 1 Sep 2016 04:55:39 +0000 (+0900) Subject: vertical dir. and longtable (texjporg/platex #21) X-Git-Tag: 20160905.0~3 X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=ea7139b7a0fd8a90b0700222383ce08e78ea2927;p=luatex-ja%2Fluatexja.git vertical dir. and longtable (texjporg/platex #21) --- diff --git a/src/ltj-direction.lua b/src/ltj-direction.lua index 359442f..61d0819 100644 --- a/src/ltj-direction.lua +++ b/src/ltj-direction.lua @@ -266,15 +266,22 @@ end -- hpack_filter, vpack_filter, post_line_break_filter -- の結果を組方向を明示するため,先頭に dir_node を設置 +local get_box_dir do local function create_dir_whatsit_hpack(h, gc) local hd = to_direct(h) - if gc=='fin_row' or gc == 'preamble' then + if gc=='fin_row' then if hd then + for p in traverse_id(15, hd) do -- unset + if get_box_dir(p, 0)==0 then + setfield(p, 'head', create_dir_whatsit(getlist(p), 'fin_row', ltjs.list_dir)) + end + end set_attr(hd, attr_icflag, PROCESSED_BEGIN_FLAG) ensure_tex_attr(attr_icflag, 0) end return h + elseif gc == 'preamble' then else adjust_badness(hd) return to_node(create_dir_whatsit(hd, gc, ltjs.list_dir)) @@ -490,7 +497,7 @@ end -- 1st ret val: b の組方向 -- 2nd ret val はその DIR whatsit -local function get_box_dir(b, default) +function get_box_dir(b, default) start_time_measure('get_box_dir') local dir = has_attr(b, attr_dir) or 0 local bh = getfield(b,'head') @@ -703,7 +710,7 @@ do local bid = getid(b) if bid==id_hlist or bid==id_vlist then local p = getlist(b) - -- alignment 由来 + -- alignment の各行の中身が入ったボックス if p and getid(p)==id_glue and getsubtype(p)==12 then -- tabskip local np = node_next(p); local npid = getid(np) if npid==id_hlist or npid==id_vlist then diff --git a/src/patches/lltjcore.sty b/src/patches/lltjcore.sty index 703c00f..a075947 100644 --- a/src/patches/lltjcore.sty +++ b/src/patches/lltjcore.sty @@ -264,7 +264,7 @@ \@texttop \dimen@ \dp\@outputbox \unvbox \@outputbox - \ifnum\ltjgetparameter{direction}=4\else\hskip\z@\fi %%% LuaTeX-ja + \ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja \vskip -\dimen@ \@textbottom }%