OSDN Git Service

Import from platex/2c50d2a22
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 26 Sep 2020 05:46:33 +0000 (14:46 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 26 Sep 2020 05:46:33 +0000 (14:46 +0900)
doc/luatexja.dtx
src/patches/lltjfont.sty
src/patches/lltjp-atbegshi.sty

index 7dd5bf9..0d5ed00 100644 (file)
@@ -5804,12 +5804,12 @@ and 4 means \emph{yoko} direction (horizontal typesetting).
 \item
 %<*en>
 For an integer~<reg\_num> between 0~and~65535,
-\verb+\ltjgetparameter{boxdim}{+<reg\_num>\verb+}+ returns the direction of
+\verb+\ltjgetparameter{boxdir}{+<reg\_num>\verb+}+ returns the direction of
 \cs{box}<reg\_num>. If this box register is void, the returned value is zero.
 %</en>
 %<*ja>
 0--65535の数<reg\_num>に対して,
-\verb+\ltjgetparameter{boxdim}{+<reg\_num>\verb+}+ は,\cs{box}<reg\_num>に
+\verb+\ltjgetparameter{boxdir}{+<reg\_num>\verb+}+ は,\cs{box}<reg\_num>に
 格納されているボックスの組方向を表す.もしこのレジスタが空の場合は,0が返される.
 %</ja>
 
index 3578a84..5e07a3c 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2020-05-17 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2020-09-26 Patch to NFSS2 for LuaTeX-ja]
 
 %% patching \DeclareTextComposite
 \def\ltj@chardef@text@cmd#1{%
 
 \let\romanprocess@table\process@table
 \def\kanjiprocess@table{%
-  \kanjiencoding{\kanjiencodingdefault}%
-  \kanjifamily{\kanjifamilydefault}%
-  \kanjiseries{\kanjiseriesdefault}%
-  \kanjishape{\kanjishapedefault}%
+  \kanjiencoding\kanjiencodingdefault%
+  \edef\k@family{\kanjifamilydefault}%
+  \edef\k@series{\kanjiseriesdefault}%
+  \edef\k@shape{\kanjishapedefault}%
 }
 \def\process@table{%
   \romanprocess@table
index a4b3401..fe8c3b0 100644 (file)
 \RequirePackage{expl3}
 \ExplSyntaxOn\makeatletter
 \box_new:N \l__platex_shipout_dummy_box
-\tl_put_left:Nn {\__shipout_execute_cont:}
-  {\tex_setbox:D \l__platex_shipout_dummy_box \tex_vbox:D \c_group_begin_token \yoko }
-\tl_put_right:Nn {\__shipout_execute_cont:} {\c_group_end_token}
-\ExplSyntaxOff
+\cs_new_eq:NN \__platex_original_shipout_execute_cont: \__shipout_execute_cont:
+\cs_set:Npn \__shipout_execute_cont:
+{
+  % 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
+  % 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_original_shipout_execute_cont:
+  \else
+    \vbox_set:Nn \l__platex_shipout_dummy_box {
+      \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
+}
 %</ltshipout>-----------------------------------
 
 \expandafter\endinput