summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty87
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua13
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.tex4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty36
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty22
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty12
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua7
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty4
-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
14 files changed, 168 insertions, 239 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
index 622b3877233..2ce01d71b17 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
@@ -13,7 +13,7 @@
\ifltj@in@latex %<*LaTeX>
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{ltj-base}[2020-08-04]
+ \ProvidesPackage{ltj-base}[2021-03-16]
\fi %</LaTeX>
%%------------------ Tiny helpers
@@ -40,17 +40,7 @@
%% \ltj@q@mark
\protected\def\ltj@q@mark{\ltj@q@mark@}
-%! etoolbox の \letcs, \cslet, \csletcs.
-%% \ltj@letcs
-\protected\def\ltj@letcs#1#2{
- \expandafter\let\expandafter#1\csname#2\endcsname
-}
-
-%% \ltj@cslet
-\protected\def\ltj@cslet#1#2{
- \expandafter\let\csname#1\endcsname#2
-}
-
+%! etoolbox の \csletcs.
%% \ltj@csletcs
\protected\def\ltj@csletcs#1#2{
\expandafter\let\csname#1\expandafter\endcsname
@@ -66,12 +56,6 @@
\else\expandafter\ltx@secondoftwo\fi
}
-%% \ltj@if@empty{<stuff>}{<yes>}{<no>}
-%! <stuff> が空であるか.
-% Checks if <stuff> is empty.
-\long\def\ltj@if@empty#1{
- \ltj@ifx{\ltj@@q@empty#1\ltj@@q@empty}
-}
\protected\def\ltj@@q@empty{\ltj@@q@empty@}
%% \ltj@if@blank{<stuff>}{<yes>}{<no>}
@@ -96,10 +80,6 @@
%! plain であるか.
\ltj@csletcs{ifltj@in@plain}{iffalse}
-%% \ltj@print{<message>}
-%! 端末への出力.
-\let\ltj@print\typeout
-
\else %<*!LaTeX>
%% \ifltj@in@plain
@@ -109,11 +89,6 @@
\ltj@csletcs{ifltj@in@plain}{iffalse}
\fi
-%% \ltj@print{<message>}
-\def\ltj@print#1{
- \immediate\write16{#1}
-}
-
\fi %</LaTeX>
%%------------------ Value-token handling
@@ -201,28 +176,6 @@
}
}
-%% \ltj@safe@real{<real>}
-%! 実数. これは十進表記に限る.
-% For a real number given in decimal notation or a macro that
-% expands to such notation.
-\def\ltj@safe@real#1{
- (tonumber("\luatexluaescapestring{#1}"))
-}
-
-%% \ltj@val@counter{<counter>}
-%! LaTeX カウンタの現在値.
-% For the current value of a LaTeX counter.
-\def\ltj@val@counter#1{
- (\expandafter\number\csname c@#1\endcsname)
-}
-
-%% \ltj@val@skip{<skip>}
-% For the current value of a skip (or LaTeX-length) parameter.
-%! グルーレジスタ(LaTeX 長さ変数).
-%! 整形式のグルー値にも使える.
-\def\ltj@val@skip#1{
- (luatexja.base.to_skip("\the\glueexpr#1\relax"))
-}
%! 整形式の整数 → 数値 : \number#1
%! 内部寸法 → 数値 : \number#1
%! 整形式の寸法 → 数値 : \number\dimexpr#1\relax
@@ -234,17 +187,6 @@
"\luatexluaescapestring{\detokenize{#1}}"
}
-%% \ltj@luaescape{<text>}
-%! 非トークン化して Lua エスケープ.
-\def\ltj@luaescape#1{
- \luatexluaescapestring{\detokenize{#1}}
-}
-%% \ltj@luaxescape{<text>}
-%! 非トークン化せずに(展開ありで) Lua エスケープ.
-%! つまり単なる \luatexescape.
-\let\ltj@luaxescape\luatexluaescapestring
-
-
%%------------------ debug logging
\ifdefined\LuaTeXjaDebugEnabled
@@ -284,30 +226,15 @@
%% \ltj@afterbox <token><box>
%% -> \setbox\ltj@afbox<box><token>
-%% from Sonja Maus, ``Looking Ahead for a <box>'',
-%% TUGBoat, 11, No. 4, 1990.
+%% idea from the atbegshi package
\newbox\ltj@afbox
\directlua{luatexja.afbox_number=\the\ltj@afbox}
\protected\def\ltj@afterbox#1{%
- \def\ltj@afb@xarg{#1}%
- \afterassignment\ltj@afb@x
- \chardef\ltj@@next`.}
-\def\ltj@afb@x{\futurelet\ltj@@next\ltj@afb@xtest}
-\def\ltj@afb@xtest{%
- \ifcase\ifx\ltj@@next\hbox\tw@\fi
- \ifx\ltj@@next\vbox\tw@\fi
- \ifx\ltj@@next\vtop\tw@\fi
- \ifx\ltj@@next\box\@ne\fi
- \ifx\ltj@@next\copy\@ne\fi
- \ifx\ltj@@next\vsplit\@ne\fi
- \ifx\ltj@@next\lastbox\@ne\fi
- 0% ``A <box> was ...'' error will be causes by \setbox later anyway.
- \or\afterassignment\ltj@afb@xarg
- \or\afterassignment\ltj@afb@xagarg
- \fi
- \setbox\ltj@afbox
+ \def\ltj@afbox@@arg{#1}\edef\ltj@afbox@@grouplevel{\number\currentgrouplevel}%
+ \afterassignment\ltj@afbox@@\setbox\ltj@afbox}
+\def\ltj@afbox@@{%
+ \ifnum\ltj@afbox@@grouplevel<\currentgrouplevel\expandafter\aftergroup\fi\ltj@afbox@@arg
}
-\def\ltj@afb@xagarg{\aftergroup\ltj@afb@xarg}
%%------------------ all done
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
index 4c6c3b6bd7a..47b4aec1d00 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
@@ -1113,21 +1113,18 @@ do
end
end
end
- local getbox, shipout = tex.getbox, tex.shipout
- local setbox, copy = node.direct.setbox, node.direct.copy
- local afbox
- function luatexja.direction.shipout()
+ local copy = node.direct.copy
+ function luatexja.direction.shipout_lthook (head)
start_time_measure 'box_primitive_hook'
- if (not afbox) and luatexja.afbox_number then afbox = luatexja.afbox_number end
- local a = to_direct(getbox 'ltj@afbox')
+ local a = to_direct(head)
local a_dir = get_box_dir(a, dir_yoko)
if a_dir~=dir_yoko then
local b = create_dir_node(a, a_dir, dir_yoko, false)
setfield(b, 'head', a); a = b
end
setfield(shipout_temp, 'head', a); finalize_inner(shipout_temp)
- setbox(afbox, copy(getlist(shipout_temp))); setfield(shipout_temp, 'head',nil)
- shipout(afbox)
+ a = copy(getlist(shipout_temp)); setfield(shipout_temp, 'head',nil)
stop_time_measure 'box_primitive_hook'
+ return to_node(a)
end
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.tex b/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.tex
index a0fd69a864f..179e621054d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.tex
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.tex
@@ -226,6 +226,7 @@
\ltjsetparameter{alxspmode={`],postonly}}
\ltjsetparameter{alxspmode={``,preonly}}
\ltjsetparameter{alxspmode={`',postonly}}
+\ltjsetparameter{alxspmode={`:,postonly}}
\ltjsetparameter{alxspmode={`;,postonly}}
\ltjsetparameter{alxspmode={44,postonly}}
\ltjsetparameter{alxspmode={`.,postonly}}
@@ -364,6 +365,7 @@
\ltjsetparameter{jaxspmode={`。,postonly}}
\ltjsetparameter{jaxspmode={`,,postonly}}
\ltjsetparameter{jaxspmode={`.,postonly}}
+\ltjsetparameter{jaxspmode={`:,postonly}}
\ltjsetparameter{jaxspmode={`;,postonly}}
\ltjsetparameter{jaxspmode={`?,postonly}}
\ltjsetparameter{jaxspmode={`!,postonly}}
@@ -465,5 +467,5 @@
\directlua{%
local s = table.copy(luatexja.stack.charprop_stack_table[0])
- luatexja.base.save_cache('ltj-kinsoku_default', {s, version=2})
+ luatexja.base.save_cache('ltj-kinsoku_default', {s, version=3})
}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
index 213f2f71094..6517262f56c 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
@@ -12,19 +12,11 @@
\def\luatexjalatexLoaded{\endinput}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2020-12-29 LaTeX support of LuaTeX-ja]
-
-% cleanup at end of the document
-%\let\ltj@@orig@end=\@@end
-%\protected\def\@@end{%
-% \directlua{luatexja.ext_cleanup()}\ltj@@orig@end}
+\ProvidesPackage{ltj-latex}[2021-03-18 LaTeX support of LuaTeX-ja]
\endlinechar=13
%%% LaTeX version detection
-\ifcsname tex_shipout:D\endcsname
- \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout
-\fi
\newif\ifltj@ltfilehook@avail
\@ifl@t@r\fmtversion{2020-10-01}{%
\@ifl@t@r\fmtversion{2020-10-02}%
@@ -34,6 +26,32 @@
\else\ltj@ltfilehook@availtrue\fi
}%
}{}
+\@ifl@t@r\fmtversion{2021-05-01}{\count@=1 }{\count@=0 }
+\ifnum \count@<1
+%%%% \shipout
+ \newluafunction\ltj@@lua@shipout@inner
+ \directlua{
+ local t = lua.get_functions_table()
+ local getbox, setbox = tex.getbox, tex.setbox
+ local shipout_lthook = luatexja.direction.shipout_lthook
+ t[\the\ltj@@lua@shipout@inner]=function ()
+ local a = shipout_lthook(getbox(\the\ltj@afbox))
+ if a then setbox(\the\ltj@afbox, a) end
+ end
+ }
+ \protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner
+ \def\ltj@shipout@{\ltj@@lua@shipout\primitive\shipout\box\ltj@afbox}%
+ \protected\def\ltj@shipout{\ltj@afterbox\ltj@shipout@}
+ \ifprimitive\shipout\let\shipout\ltj@shipout\fi
+ \ifcsname tex_shipout:D\endcsname
+ \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout
+ \fi
+ \directlua{luatexja.direction.shipout_lthook = nil}
+\else
+ \directlua{%
+ luatexbase.add_to_callback('pre_shipout_filter',luatexja.direction.shipout_lthook, 'ltj.direction', 1)
+ }
+\fi
%%% patch for LaTeX
\usepackage{lltjfont}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index 58baa9ff9db..c6f976767ff 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
@@ -23,10 +23,25 @@
%! ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
% LuaTeX-ja macros against plain TeX
+%%%%\shipout
+\newluafunction\ltj@@lua@shipout@inner
+\directlua{
+ local t = lua.get_functions_table()
+ local getbox, setbox = tex.getbox, tex.setbox
+ local shipout_lthook = luatexja.direction.shipout_lthook
+ t[\the\ltj@@lua@shipout@inner]=function ()
+ local a = shipout_lthook(getbox(\the\ltj@afbox))
+ if a then setbox(\the\ltj@afbox, a) end
+ end
+}
+\protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner
+\def\ltj@shipout@{\ltj@@lua@shipout\primitive\shipout\box\ltj@afbox}%
+\protected\def\ltj@shipout{\ltj@afterbox\ltj@shipout@}
+\ifprimitive\shipout\let\shipout\ltj@shipout\fi
+\directlua{luatexja.direction.shipout_lthook = nil}
+
\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi
\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{file:HaranoAjiGothic-Medium.otf}\fi
-%\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{IPAExMincho}\fi
-%\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{IPAExGothic}\fi
\ifdefined\ltj@stdyokojfm\else\def\ltj@stdyokojfm{ujis}\fi
\ifdefined\ltj@stdtatejfm\else\def\ltj@stdtatejfm{ujisv}\fi
\newread\ltj@@cfgread
@@ -96,9 +111,6 @@
\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
-\let\ltj@@orig@end=\@@end
-\protected\def\@@end{%
- \directlua{luatexja.ext_cleanup()}\ltj@@orig@end}
\directlua{luatexja.jfont.register_vert_replace{
[',']='、', ['.']='。', ['“']=0x301D, ['”']=0x301F,
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
index 9824ff155ac..cd8b98aa27b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
@@ -312,7 +312,7 @@ local function enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
local intmode = floor(tmp_tbl.mode/4)%4
if no_begin then mapre = mapre + tmp_tbl.before_jfmgk end
if no_end then mapost = mapost + tmp_tbl.after_jfmgk end
- if (tmp_tbl.mode%4 >=2) and (tmp.pre<0) and (tmp.post<0) then
+ if (tmp_tbl.mode%4 >=2) and (tmp_tbl.pre<0) and (tmp_tbl.post<0) then
mapre = min(mapre,mapost); mapost = mapre
end
if intmode == 0 then -- とりあえず組んでから決める
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index e1baefbf198..3f3f1021918 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2021-01-02 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2021-03-16 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -701,16 +701,6 @@
\ltj@@lua@raisebox\ltj@@orig@vcenter{\box\ltj@afbox}%
}
-%%%% \shipout
-\newluafunction\ltj@@lua@shipout@inner
-\directlua{
- local t = lua.get_functions_table()
- t[\the\ltj@@lua@shipout@inner]=luatexja.direction.shipout
-}
-\protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner
-\protected\def\ltj@shipout{\ltj@afterbox\ltj@@lua@shipout}
-\ifprimitive\shipout\let\shipout\ltj@shipout\fi
-
%%%% \unhbox and \unvbox
\newluafunction\ltj@@lua@unboxcheckdir@inner
\directlua{
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index fbda46e3440..8c01db173b8 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -332,11 +332,6 @@ do
ltjb.add_to_callback('hpack_filter', adjust_icflag, 'ltj.adjust_icflag', 1)
end
--- cleanup process
-function luatexja.ext_cleanup()
- ltjf.cleanup_size_cache(); ltjd.remove_end_whatsit()
-end
-
-- lastnodechar
do
local id_glyph = node.id('glyph')
@@ -356,7 +351,7 @@ do
end
do
- local cache_ver = 2 -- must be same as ltj-kinsoku.tex
+ local cache_ver = 3 -- must be same as ltj-kinsoku.tex
local cache_outdate_fn = function (t) return t.version~=cache_ver end
local t = ltjs.charprop_stack_table
function luatexja.load_kinsoku()
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index c389cf8d50a..13e67dc3921 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -35,13 +35,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2021-02-14 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2021-03-19 Japanese Typesetting with Lua(La)TeX]
\DeclareOption{disablejfam}{\ltj@disablejfamtrue}
\DeclareOption*{}
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20210214.0}
+\def\LuaTeXjaversion{20210319.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
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}{}{}