summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty118
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty51
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty39
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty6
5 files changed, 104 insertions, 116 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index 2af25035a5f..19fe320fad4 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2020-09-28 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2021-03-19 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
%%% expl3
@@ -72,7 +72,10 @@
\fi\fi}
\patchcmd\@vtryfc{\global\setbox\@outputbox\vbox{}}
- {\global\setbox\@outputbox\vbox{\unless\ifnum\ltjgetparameter{direction}=4\hskip\z@\fi}}{}{}
+ {\global\setbox\@outputbox\vbox{%
+ \unless\ifnum\ltjgetparameter{direction}=4
+ \primitive\everypar{}\hskip\z@\fi
+ }}{}{}
\newif\iftombow \tombowfalse
\newif\iftombowdate \tombowdatetrue
@@ -86,7 +89,7 @@
\newbox\@BR\newbox\@Br
\newbox\@CL
\newbox\@CR
-\font\@bannerfont=cmtt9
+\font\@bannerfont=file:lmmono9-regular.otf % cmtt9 in pLaTeX
\newtoks\@bannertoken
\@bannertoken{}
\def\maketombowbox{%
@@ -134,23 +137,23 @@
}
\def\@outputtombow{%
\iftombow
- \vbox to\z@{\kern-\dimexpr 10mm+\@tombowbleed\relax
+ \vbox to\z@{\kern\dimexpr-10mm-\@tombowbleed\relax
\boxmaxdepth\maxdimen
\moveleft\@tombowbleed\vbox to\@@paperheight{%
\color@begingroup
\@tombowcolor
\hbox to\@@paperwidth{\hskip\@tombowbleed\relax
\copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip\@tombowbleed}%
- \kern-10mm
+ \kern-10mm%
\hbox to\@@paperwidth{\copy\@Tl\hfill\copy\@Tr}%
\vfill
\hbox to\@@paperwidth{\copy\@CL\hfill\copy\@CR}%
\vfill
\hbox to\@@paperwidth{\copy\@Bl\hfill\copy\@Br}%
- \kern-10mm
+ \kern-10mm%
\hbox to\@@paperwidth{\hskip\@tombowbleed\relax
\copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip\@tombowbleed}%
- \color@endgroup
+ \color@endgroup
}\vss
}%
\fi
@@ -158,80 +161,45 @@
\def\@tombowcolor{\normalcolor}
\def\@tombowbleed{3mm}
\def\@tombowreset@@paper{%
- \@@topmargin\topmargin
- \iftombow
- \@@paperwidth\paperwidth
- \advance\@@paperwidth 2\dimexpr\@tombowbleed\relax
- \@@paperheight\paperheight\advance\@@paperheight 10mm\relax
- \advance\@@paperheight 2\dimexpr\@tombowbleed\relax
- \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax
- \fi
+ \@@topmargin \topmargin % only for compatibility
+ \iftombow
+ \@@paperwidth\dimexpr\paperwidth+2\dimexpr\@tombowbleed\relax
+ \@@paperheight\dimexpr\paperheight+10mm+2\dimexpr\@tombowbleed\relax
+ \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax
+ \fi
}
\newdimen\@@paperheight
\newdimen\@@paperwidth
-\newdimen\@@topmargin
-\def\@outputpage{%
-\begingroup % the \endgroup is put in by \aftergroup
+\newdimen\@@topmargin % not used by LuaTeX-ja; only to avoid existing codes
+\patchcmd\@outputpage{\begingroup\let\protect\noexpand}{% tate direction
+\begingroup
\ifnum\ltjgetparameter{direction}=4\else
\dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@
\fi
\let \protect \noexpand
- \language\document@default@language %LaTeX2e 2017/05/01
- \@resetactivechars
- \global\let\@@if@newlist\if@newlist
- \global\@newlistfalse
- \@parboxrestore
- \shipout\vbox{\yoko
+}{}{}
+\patchcmd\@outputpage{% supply \yoko
\set@typeset@protect
- \aftergroup\endgroup
- \aftergroup\set@typeset@protect
- \if@specialpage
- \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
- \fi
- \if@twoside
- \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
- \ifnum\ltjgetparameter{direction}=3 \let\@themargin\evensidemargin
- \else\let\@themargin\oddsidemargin\fi
- \else \let\@thehead\@evenhead
- \let\@thefoot\@evenfoot
- \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin
- \else\let\@themargin\evensidemargin\fi
- \fi\fi
- \@tombowreset@@paper
- \reset@font
- \normalsize
- \normalsfcodes
- \let\label\@gobble
- \let\index\@gobble
- \let\glossary\@gobble
- \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
- \@begindvi
- \@outputtombow
- \vskip \@@topmargin
- \moveright\@themargin\vbox{%
- \setbox\@tempboxa \vbox to\headheight{%
- \vfil
- \color@hbox
- \normalcolor
- \hb@xt@\textwidth{\@thehead}%
- \color@endbox
- }% %% 22 Feb 87
- \dp\@tempboxa \z@
- \box\@tempboxa
- \vskip \headsep
- \box\@outputbox
- \baselineskip \footskip
- \color@hbox
- \normalcolor
- \hb@xt@\textwidth{\@thefoot}%
- \color@endbox
- }%
- }%
- \global\let\if@newlist\@@if@newlist
- \global \@colht \textheight
- \stepcounter{page}%
- \let\firstmark\botmark
-}
+ \aftergroup \endgroup
+}{%
+ \yoko \set@typeset@protect
+ \aftergroup \endgroup
+}{}{}
+\patchcmd\@outputpage{\let\@thefoot\@oddfoot\let\@themargin\oddsidemargin}{% tate direction
+ \let\@thefoot\@oddfoot
+ \ifnum\ltjgetparameter{direction}=3 \let\@themargin\evensidemargin
+ \else\let\@themargin\oddsidemargin\fi
+}{}{}
+\patchcmd\@outputpage{\let\@thefoot\@evenfoot\let\@themargin\evensidemargin}{% tate direction
+ \let\@thefoot\@evenfoot
+ \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin
+ \else\let\@themargin\evensidemargin\fi
+}{}{}
+
+% 将来は shipout hook で書き直したい
+\patchcmd\@outputpage{\vskip\topmargin}{\vskip\topmargin\iftombow\vskip1in\fi}{}{}
+\patchcmd\@outputpage{\reset@font}{\@tombowreset@@paper\reset@font}{}{}
+\patchcmd\@outputpage{\@begindvi}{\@begindvi\@outputtombow}{}{}
%%% Remove extra xkanjiskip
\renewcommand\@makefnmark{%
@@ -327,7 +295,9 @@
\@texttop
\dimen@ \dp\@outputbox
\unvbox \@outputbox
- \unless\ifnum\ltjgetparameter{direction}=4\vbox{\hskip\z@}\fi %%% LuaTeX-ja
+ \unless\ifnum\ltjgetparameter{direction}=4
+ \vbox{\primitive\everypar{}\hskip\z@}%
+ \fi %%% LuaTeX-ja
\vskip -\dimen@
\ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi
}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
index 8ebe8e7af23..4932e07480a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
@@ -279,6 +279,19 @@
\def\default@k@series{#3}%
\def\default@k@shape{#4}}%
\fi}
+\@onlypreamble\DeclareKanjiSubstitution
+
+\def\DeclareErrorKanjiFont#1#2#3#4#5{%
+ \xdef\error@kfontshape{%
+ \noexpand\expandafter\noexpand\split@name\noexpand\string
+ \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
+ \noexpand\@nil}%
+ \gdef\default@k@family{#2}%
+ \gdef\default@k@series{#3}%
+ \gdef\default@k@shape{#4}%
+ }
+\@onlypreamble\DeclareErrorKanjiFont
+
\let\wrong@ja@fontshape\wrong@fontshape
\let\wrong@al@fontshape\wrong@fontshape
\patchcmd\wrong@ja@fontshape{\default@shape}{\default@k@shape}{}{}
@@ -291,17 +304,6 @@
\wrong@al@fontshape
\fi
}
-\@onlypreamble\DeclareKanjiSubstitution
-\def\DeclareErrorKanjiFont#1#2#3#4#5{%
- \xdef\error@kfontshape{%
- \noexpand\expandafter\noexpand\split@name\noexpand\string
- \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname
- \noexpand\@nil}%
- \gdef\default@k@family{#2}%
- \gdef\default@k@series{#3}%
- \gdef\default@k@shape{#4}%
- }
-\@onlypreamble\DeclareErrorKanjiFont
\newif\ifltjselectfont@force@define
\def\DeclareFixedFont#1#2#3#4#5#6{%
@@ -310,16 +312,16 @@
\every@math@size{}%
\fontsize{#6}\z@
\ltj@@is@kyenc{#2}\ifin@%
- \ltjselectfont@force@definetrue
+ \ltjselectfont@force@definetrue
\usekanji{#2}{#3}{#4}{#5}%
\global\let#1\getjfont
- \ltjselectfont@force@definefalse
+ \ltjselectfont@force@definefalse
\else
\ltj@@is@ktenc{#2}\ifin@%
- \ltjselectfont@force@definetrue
+ \ltjselectfont@force@definetrue
\usekanji{#2}{#3}{#4}{#5}%
\global\let#1\gettfont
- \ltjselectfont@force@definefalse
+ \ltjselectfont@force@definefalse
\else
\useroman{#2}{#3}{#4}{#5}%
\global\expandafter\let\expandafter#1\the\font
@@ -639,7 +641,7 @@
\fi
}
\DeclareRobustCommand\fontencoding[1]{%
- \ltj@@is@kyenc{#1}\ifin@\kanjiencoding{#1}\else\romanencoding{#1}\fi}
+ \ltj@@is@kenc{#1}\ifin@\kanjiencoding{#1}\else\romanencoding{#1}\fi}
\def\@@kenc@update{%
\default@KT
\csname T@\k@encoding\endcsname
@@ -892,21 +894,13 @@
\ifnum\ltj@@latex@plv=300 % 2020-02-02 pl3, 4
\DeclareRobustCommand\romanseries[1]{\merge@font@series{#1}}
\DeclareRobustCommand\kanjiseries[1]{\merge@kanji@series{#1}}
- \DeclareRobustCommand\fontseries[1]{%
- \merge@font@series{#1}\merge@kanji@series{#1}}
\DeclareRobustCommand\romanseriesforce[1]{\edef\f@series{#1}}
\DeclareRobustCommand\kanjiseriesforce[1]{\edef\k@series{#1}}
- \DeclareRobustCommand\fontseriesforce[1]{%
- \edef\f@series{#1}\edef\k@series{#1}}
\else\ifnum\ltj@@latex@plv<1500% >=2020-02-02 pl5 and <=2020-10-01
\DeclareRobustCommand\romanseries[1]{\@forced@seriesfalse\merge@font@series{#1}}
\DeclareRobustCommand\kanjiseries[1]{\@forced@seriesfalse\merge@kanji@series{#1}}
- \DeclareRobustCommand\fontseries[1]{%
- \@forced@seriesfalse\merge@font@series{#1}\merge@kanji@series{#1}}
- \DeclareRobustCommand\romanseriesforce[1]{\@forced@seriestrue\merge@font@series{#1}}
- \DeclareRobustCommand\kanjiseriesforce[1]{\@forced@seriestrue\merge@kanji@series{#1}}
- \DeclareRobustCommand\fontseriesforce[1]{%
- \@forced@seriestrue\merge@font@series{#1}\merge@kanji@series{#1}}
+ \DeclareRobustCommand\romanseriesforce[1]{\@forced@seriestrue\edef\f@series{#1}}
+ \DeclareRobustCommand\kanjiseriesforce[1]{\@forced@seriestrue\edef\k@series{#1}}
\else% >=2021-05-01
\DeclareRobustCommand\romanseries[1]{\@forced@seriesfalse
\expandafter\def\expandafter\delayed@f@adjustment\expandafter
@@ -914,16 +908,17 @@
\DeclareRobustCommand\kanjiseries[1]{\@forced@seriesfalse
\expandafter\def\expandafter\delayed@k@adjustment\expandafter
{\delayed@k@adjustment\delayed@merge@kanji@series{#1}}}
- \DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}
\DeclareRobustCommand\romanseriesforce[1]{\@forced@seriestrue
\expandafter\def\expandafter\delayed@f@adjustment\expandafter
{\delayed@f@adjustment\edef\f@series{#1}}}
\DeclareRobustCommand\kanjiseriesforce[1]{\@forced@seriestrue
\expandafter\def\expandafter\delayed@k@adjustment\expandafter
{\delayed@k@adjustment\edef\k@series{#1}}}
- \DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}}%
\let\delayed@k@adjustment\@empty
\fi\fi
+\DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}%
+\DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}}%
+
\ifnum\ltj@@latex@plv<1500% <=2020-10-01
\DeclareRobustCommand\romanshape[1]{\merge@font@shape{#1}}
\DeclareRobustCommand\kanjishape[1]{\merge@kanji@shape{#1}}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
index a9ca6a2c140..d1a21a0e5c0 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-atbegshi}[2020-09-30 Patching \string\shipout\space hooks for LuaTeX-ja]
+\ProvidesPackage{lltjp-atbegshi}[2021-03-14 Patching \string\shipout\space hooks for LuaTeX-ja]
% concept: execute all hooks inside yoko direction \vbox
@@ -13,22 +13,24 @@
\RequirePackage{expl3}
\ExplSyntaxOn\makeatletter
\box_new:N \l__platex_shipout_dummy_box
-\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),
+\if_cs_exist:N \__shipout_execute_main_cont:Nnnn %% 2021-05-01
+\cs_new_eq:NN \__platex_original_shipout_execute_main_cont:Nnnn
+ \__shipout_execute_main_cont:Nnnn
+\cs_set:Npn \__shipout_execute_main_cont:Nnnn #1#2#3#4 {
+ % if the box #1 is not a \yoko-box (= horizontal writing),
% then make it a \yoko-box behorehand.
- \platex_if_box_yoko:NF \l_shipout_box {
- \vbox_set:Nn \l_shipout_box { \platex_direction_yoko: \box_use:N \l_shipout_box }
+ \platex_if_box_yoko:NF #1 {
+ \vbox_set:Nn #1 { \platex_direction_yoko: \box_use:N #1 }
}
% if the current direction is not \yoko,
- % then enclose \__shipout_execute_cont: with
+ % then enclose \__shipout_execute_main_cont:Nnnn with
% a dummy \yoko-box named \l__platex_shipout_dummy_box.
\platex_if_direction_yoko:TF {
- \__platex_original_shipout_execute_cont:
+ \__platex_original_shipout_execute_main_cont:Nnnn { #1 } { #2 } { #3 } { #4 }
}{
\vbox_set:Nn \l__platex_shipout_dummy_box {
- \platex_direction_yoko: \__platex_original_shipout_execute_cont:
+ \platex_direction_yoko:
+ \__platex_original_shipout_execute_main_cont:Nnnn { #1 } { #2 } { #3 } { #4 }
}
% [Limitation] the code above may discard some contents,
% so we'd like to put it back by \box\l__platex_shipout_dummy_box.
@@ -37,6 +39,23 @@
%\box_use:N \l__platex_shipout_dummy_box
}
}
+
+\else: %% 2020-10-01
+\cs_new_eq:NN \__platex_original_shipout_execute_cont: \__shipout_execute_cont:
+\cs_set:Npn \__shipout_execute_cont:
+{
+ \platex_if_box_yoko:NF \l_shipout_box {
+ \vbox_set:Nn \l_shipout_box { \platex_direction_yoko: \box_use:N \l_shipout_box }
+ }
+ \platex_if_direction_yoko:TF {
+ \__platex_original_shipout_execute_cont:
+ }{
+ \vbox_set:Nn \l__platex_shipout_dummy_box {
+ \platex_direction_yoko: \__platex_original_shipout_execute_cont:
+ }
+ }
+}
+\fi:
%</ltshipout>-----------------------------------
\ExplSyntaxOff
\expandafter\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
index f74c4963082..99ed1906318 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-footmisc}[2017/05/05 Patch to footmisc for LuaTeX-ja]
+\ProvidesPackage{lltjp-footmisc}[2021-03-17 Patch to footmisc for LuaTeX-ja]
\RequirePackage{footmisc}
\let \if@tempswa \ifFN@bottom
@@ -47,7 +47,9 @@
\setbox\@outputbox \vbox to\@colht{%
\@texttop \dimen@\dp\@outputbox
\unvbox\@outputbox
- \ifnum\ltjgetparameter{direction}=3 \vbox{\hskip\z@}\fi %%% LuaTeX-ja
+ \unless\ifnum\ltjgetparameter{direction}=4
+ \vbox{\primitive\everypar{}\hskip\z@}%
+ \fi %%% LuaTeX-ja
\vskip -\dimen@\@textbottom
}%
\fi
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
index e7535bd7e11..6ce9528d727 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
@@ -1,5 +1,5 @@
%
-% lltjp-stfloats.sty 2017-05-05
+% lltjp-stfloats.sty 2021-03-17
%
\NeedsTeXFormat{LaTeX2e}
@@ -14,7 +14,9 @@
\global\let\org@makecol\ltj@orig@makecol
\patchcmd\fn@makecol{\vskip -\dimen@\@textbottom}%
- {\ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja
+ {\unless\ifnum\ltjgetparameter{direction}=4
+ \vbox{\primitive\everypar{}\hskip\z@}%
+ \fi %%% LuaTeX-ja
\vskip -\dimen@
\ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
\patchcmd\fn@makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}