diff options
author | Norbert Preining <norbert@preining.info> | 2020-10-01 03:04:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-10-01 03:04:13 +0000 |
commit | d2a6bb90e56a2836bb59477b8f27248aab9149f5 (patch) | |
tree | 5d6be29a531495452688a3c8456355fa58d485f2 /macros/luatex/generic/luatexja/src/patches/lltjcore.sty | |
parent | 36f406d8d1fc994af516d837e6a87c68839cdb2d (diff) |
CTAN sync 202010010304
Diffstat (limited to 'macros/luatex/generic/luatexja/src/patches/lltjcore.sty')
-rw-r--r-- | macros/luatex/generic/luatexja/src/patches/lltjcore.sty | 68 |
1 files changed, 58 insertions, 10 deletions
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty index e858a8a957..2af25035a5 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty @@ -3,9 +3,61 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2020-09-13 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2020-09-28 Patch to LaTeX2e Kernel for LuaTeX-ja] \RequirePackage{etoolbox} +%%% expl3 +\RequirePackage{expl3} +\ExplSyntaxOn +\cs_set_eq:NN \platex_direction_yoko: \yoko +\cs_set_eq:NN \platex_direction_tate: \tate +\cs_set_eq:NN \platex_direction_dtou: \dtou +\cs_set_eq:NN \platex_direction_utod: \utod % LuaTeX-ja specific +\prg_new_conditional:Npnn \platex_if_box_yoko:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 4 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_box_utod:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_eq_conditional:NNn \platex_if_box_tate_math:N \platex_if_box_utod:N { p, T, F, TF } +\prg_new_conditional:Npnn \platex_if_box_tate_nomath:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_box_tate:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop: + \prg_return_true: + \else: \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop: % utod + \prg_return_true: + \else + \prg_return_false: + \fi: \fi:} +\prg_new_conditional:Npnn \platex_if_box_dtou:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 1 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_yoko: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 4 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_utod: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_eq_conditional:NNn + \platex_if_direction_tate_math: \platex_if_direction_utod: { p, T, F, TF } +\prg_new_conditional:Npnn \platex_if_direction_tate_nomath: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_tate: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop: + \prg_return_true: + \else: \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop: % utod + \prg_return_true: + \else + \prg_return_false: + \fi: \fi:} +\prg_new_conditional:Npnn \platex_if_direction_dtou: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 1 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\ExplSyntaxOff + \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page \ifnum\ltjgetparameter{direction}=3 @@ -18,6 +70,10 @@ \if@twocolumn\hbox{}\newpage\fi \fi \fi\fi} + +\patchcmd\@vtryfc{\global\setbox\@outputbox\vbox{}} + {\global\setbox\@outputbox\vbox{\unless\ifnum\ltjgetparameter{direction}=4\hskip\z@\fi}}{}{} + \newif\iftombow \tombowfalse \newif\iftombowdate \tombowdatetrue \newdimen\@tombowwidth @@ -239,14 +295,6 @@ \ifmmode\@@underline{#1}% \else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi} -%%% AtBeginDvi: NOT needed to patch in LaTeX 2020-10-01 pre-release 9 or later -\unless\ifltj@ltshipout@avail -\DeclareRobustCommand \AtBeginDvi [1]{% - \global \setbox \@begindvibox - \vbox{\yoko\unvbox \@begindvibox #1}% -} -\fi - \newif\iffnfixbottom \newif\ifltj@ftn@unvboxed %%% @makecol @@ -279,7 +327,7 @@ \@texttop \dimen@ \dp\@outputbox \unvbox \@outputbox - \ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja + \unless\ifnum\ltjgetparameter{direction}=4\vbox{\hskip\z@}\fi %%% LuaTeX-ja \vskip -\dimen@ \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi }% |