X-Git-Url: http://git.osdn.net/view?p=luatex-ja%2Fluatexja.git;a=blobdiff_plain;f=src%2Fpatches%2Flltjp-atbegshi.sty;h=a9ca6a2c14040bcf4ee89679dbed734e74850f55;hp=07f16731be8e1b38992eb7d13677f13034006414;hb=51ffc6ee77fd6f1429c386cf38171c4db0fd19a9;hpb=7eadf7a4c6069438622aa737ec4c10c3e7544849 diff --git a/src/patches/lltjp-atbegshi.sty b/src/patches/lltjp-atbegshi.sty index 07f1673..a9ca6a2 100644 --- a/src/patches/lltjp-atbegshi.sty +++ b/src/patches/lltjp-atbegshi.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-atbegshi}[2020-09-27 Patching \string\shipout\space hooks for LuaTeX-ja] +\ProvidesPackage{lltjp-atbegshi}[2020-09-30 Patching \string\shipout\space hooks for LuaTeX-ja] % concept: execute all hooks inside yoko direction \vbox @@ -18,27 +18,27 @@ { % if \l_shipout_box is not a \yoko-box (= horizontal writing), % then make it a \yoko-box behorehand. - \unless\ifnum\ltjgetparameter{boxdir}{\l_shipout_box}=4 - \vbox_set:Nn \l_shipout_box { \yoko \box_use:N \l_shipout_box } - \fi + \platex_if_box_yoko:NF \l_shipout_box { + \vbox_set:Nn \l_shipout_box { \platex_direction_yoko: \box_use:N \l_shipout_box } + } % if the current direction is not \yoko, % then enclose \__shipout_execute_cont: with % a dummy \yoko-box named \l__platex_shipout_dummy_box. - \ifnum\ltjgetparameter{direction}=4 + \platex_if_direction_yoko:TF { \__platex_original_shipout_execute_cont: - \else + }{ \vbox_set:Nn \l__platex_shipout_dummy_box { - \yoko \__platex_original_shipout_execute_cont: + \platex_direction_yoko: \__platex_original_shipout_execute_cont: } % [Limitation] the code above may discard some contents, % so we'd like to put it back by \box\l__platex_shipout_dummy_box. % however, an infinite loop occurs if we uncomment the line below % so we can't. %\box_use:N \l__platex_shipout_dummy_box - \fi + } } %----------------------------------- - +\ExplSyntaxOff \expandafter\endinput \fi \RequirePackage{atbegshi}