summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
commit1f457376b478257b88d4a857f5ec1b6155442dd7 (patch)
tree2a06a60551dea362cf8cb0cb0ba66c78608717c4 /macros/luatex/generic/luatexja
parentac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff)
CTAN sync 202009200303
Diffstat (limited to 'macros/luatex/generic/luatexja')
-rw-r--r--macros/luatex/generic/luatexja/README8
-rw-r--r--macros/luatex/generic/luatexja/doc/jfm-testf.lua34
-rw-r--r--macros/luatex/generic/luatexja/doc/lltjp-geometry.pdfbin166499 -> 166557 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/lltjp-geometry.tex58
-rw-r--r--macros/luatex/generic/luatexja/doc/ltjclasses.pdfbin400552 -> 400357 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/ltjltxdoc.pdfbin69351 -> 69366 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/ltjsclasses.pdfbin457743 -> 452484 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-en.pdfbin687159 -> 700835 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ja.pdfbin1105103 -> 1116496 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja.dtx241
-rw-r--r--macros/luatex/generic/luatexja/src/addons/luatexja-fontspec.sty4
-rw-r--r--macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty9
-rw-r--r--macros/luatex/generic/luatexja/src/lltjext.sty2
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-jfont.lua144
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-kinsoku.tex3
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.lua2
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.sty4
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjcore.sty6
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty12
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty3
20 files changed, 337 insertions, 193 deletions
diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README
index 41528dbd95..1dd9fa3677 100644
--- a/macros/luatex/generic/luatexja/README
+++ b/macros/luatex/generic/luatexja/README
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20200808.0
+The LuaTeX-ja Package 20200919.0
--------------------------------
Copyright (c) 2011--2020 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -45,9 +45,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20200808.0 in the Git repository by
+ or tagged as 20200919.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20200808.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20200919.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -96,4 +96,4 @@ Notes
This file and ltj-kinsoku.lua are not used anymore.
(Do not remove ltj-kinsoku.tex.)
-Last commit date: Sat Aug 8 18:25:40 2020 +0900
+Last commit date: Sat Sep 19 20:08:05 2020 +0900
diff --git a/macros/luatex/generic/luatexja/doc/jfm-testf.lua b/macros/luatex/generic/luatexja/doc/jfm-testf.lua
new file mode 100644
index 0000000000..36185344fd
--- /dev/null
+++ b/macros/luatex/generic/luatexja/doc/jfm-testf.lua
@@ -0,0 +1,34 @@
+local t = luatexja.jfont.jfm_feature
+myjfm = t
+local k = (type(t and t.kern)=='string') and tonumber(t.kern) or 0.0
+local d = (type(t and t.down)=='string') and tonumber(t.down) or 0.0
+local t2= {
+ dir = 'yoko',
+ zw = 1.0, zh = 1.0,
+ [0] = {
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ kern = { [1] = k }
+ },
+ [1] = {
+ chars = { '漢', '字', },
+ align = 'left', left = 0.0, down = d,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ kern = { [0] = 0.5, [2] = 0.5, [1000] = 0.5 }
+ },
+ [2] = {
+ chars = { 'イ' },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ kern = { [1] = k }
+ },
+ [1000] = {
+ chars = { 'boxbdd' },
+ },
+}
+if t and t.hira then
+ for i=0x3040,0x309F do
+ table.insert(t2[1].chars, i)
+ end
+end
+luatexja.jfont.define_jfm (t2)
diff --git a/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf b/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
index 20c4edb88f..ae9cf55661 100644
--- a/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
+++ b/macros/luatex/generic/luatexja/doc/lltjp-geometry.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/lltjp-geometry.tex b/macros/luatex/generic/luatexja/doc/lltjp-geometry.tex
index 28be8dad3c..b8d4963305 100644
--- a/macros/luatex/generic/luatexja/doc/lltjp-geometry.tex
+++ b/macros/luatex/generic/luatexja/doc/lltjp-geometry.tex
@@ -136,35 +136,35 @@
つまり,横組クラスで\Pkg{geometry}パッケージを普通に使用した場合にも
当てはまる注意事項である.
-\subsection{\Pkg{fontspec}パッケージとの干渉}
-\Pkg{fontspec}パッケージの,読み込み直後に
-\Pkg{geometry}パッケージを用いてレイアウトを設定すると,
-\texttt{lines}による指定が正しく働かないという症状が生じる:
-\begin{lstlisting}
-\documentclass{article}
-\usepackage{geometry}
-\usepackage{fontspec}
-\geometry{lines=20}
-\begin{document}
-hoge\typeout{\the\topskip, \the\baselineskip, \the\textheight}
-\end{document}
-\end{lstlisting}
-\cs{typeout}で\cs{topskip}, \cs{baselineskip}, \cs{textheight}の値を調べると
-\[
- \frac{\cs{textheight} - \cs{topskip}}{\cs{baselineskip}} = 15.8\dot 3
-\]
-となることがわかるから,1ページには16行分入らないことがわかる.
-
-これは,\Pkg{fontspec}の読み込みによって\cs{baselineskip}がなぜか
-10\,ptに変えられてしまい,\cs{geometry}命令はその値に従って本文領域の高さを計算するためで
-ある.とりあえずの対策は,
-\cs{normalsize}によって\cs{baselineskip}を正しい値に再設定し,その後
-レイアウトを設定すれば良い:
-\begin{lstlisting}
-\usepackage{geometry}
-\usepackage{fontspec}
-\normalsize\geometry{lines=20}
-\end{lstlisting}
+% \subsection{\Pkg{fontspec}パッケージとの干渉}
+% \Pkg{fontspec}パッケージの,読み込み直後に
+% \Pkg{geometry}パッケージを用いてレイアウトを設定すると,
+% \texttt{lines}による指定が正しく働かないという症状が生じる:
+% \begin{lstlisting}
+% \documentclass{article}
+% \usepackage{geometry}
+% \usepackage{fontspec}
+% \geometry{lines=20}
+% \begin{document}
+% hoge\typeout{\the\topskip, \the\baselineskip, \the\textheight}
+% \end{document}
+% \end{lstlisting}
+% \cs{typeout}で\cs{topskip}, \cs{baselineskip}, \cs{textheight}の値を調べると
+% \[
+% \frac{\cs{textheight} - \cs{topskip}}{\cs{baselineskip}} = 15.8\dot 3
+% \]
+% となることがわかるから,1ページには16行分入らないことがわかる.
+
+% これは,\Pkg{fontspec}の読み込みによって\cs{baselineskip}がなぜか
+% 10\,ptに変えられてしまい,\cs{geometry}命令はその値に従って本文領域の高さを計算するためで
+% ある.とりあえずの対策は,
+% \cs{normalsize}によって\cs{baselineskip}を正しい値に再設定し,その後
+% レイアウトを設定すれば良い:
+% \begin{lstlisting}
+% \usepackage{geometry}
+% \usepackage{fontspec}
+% \normalsize\geometry{lines=20}
+% \end{lstlisting}
\subsection{\cs{maxdepth}の調整}
diff --git a/macros/luatex/generic/luatexja/doc/ltjclasses.pdf b/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
index 4184764810..f46b1a5913 100644
--- a/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
+++ b/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/ltjltxdoc.pdf b/macros/luatex/generic/luatexja/doc/ltjltxdoc.pdf
index 2fbbb67664..ebbd0df0c6 100644
--- a/macros/luatex/generic/luatexja/doc/ltjltxdoc.pdf
+++ b/macros/luatex/generic/luatexja/doc/ltjltxdoc.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf b/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
index b9edb1d562..db3c1284a4 100644
--- a/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
+++ b/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
index ba86234554..10781331bf 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
index 6936022302..af10219221 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja.dtx b/macros/luatex/generic/luatexja/doc/luatexja.dtx
index 3467498552..7dd5bf91e4 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja.dtx
+++ b/macros/luatex/generic/luatexja/doc/luatexja.dtx
@@ -22,12 +22,13 @@
\usepackage{luatexja-otf}
\usepackage[no-math]{fontspec}
\setmainfont[Ligatures=TeX,RawFeature=-notdef]{Linux Libertine O}
-\setmonofont[RawFeature=-notdef, Ligatures=CommonOff, CharacterVariant={31,45,61,36},
+\setmonofont[RawFeature=-notdef, Ligatures=CommonOff, %CharacterVariant={31,45,61,36},
%<en> Scale=0.8132073118633364, FakeStretch=1.183236,
%<ja> Scale=MatchLowercase, FakeStretch=1.137121,
- ItalicFont=iosevka-slab-oblique,
- BoldFont=iosevka-slab-bold, BoldItalicFont=iosevka-slab-bolditalic,
-]{iosevka-slab-regular}
+ Contextuals=AlternateOff,
+ ItalicFont=Iosevka Term Slab Oblique,
+ BoldFont=Iosevka Term Slab Bold, BoldItalicFont=Iosevka Term Slab Bold Oblique,
+]{Iosevka Term Slab}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX,RawFeature=-notdef]{Linux Biolinum O}
\usepackage[match]{luatexja-fontspec}
\usepackage[haranoaji]{luatexja-preset}
@@ -3427,13 +3428,26 @@ so TrueType/OpenType fonts with features can be used for Japanese fonts:
TrueType/OpenTypeフォントにfeatureを指定したものを和文フォントとして用いる
ことができる:
%</ja>
-\begin{LTXexample}[width=0.3\textwidth]
+\begin{LTXexample}[width=0.25\textwidth]
\jfont\tradmc={IPAexMincho:script=latn;%
+trad;-kern;jfm=ujis} at 14pt
\tradmc 当/体/医/区
\end{LTXexample}
%<*en>
+It is required to specify a (horizontal) \emph{JFM} in at each calling of \cs{jfont}.
+A JFM is a Lua script which contains
+measurements of characters and glues/kerns that are automatically
+inserted for Japanese typesetting.
+The structure of JFM will be described in the next subsection.
+%</en>
+%<*ja>
+\cs{jfont}命令の実行ごとにどの(横組用)JFMを用いるのかを指定する必要がある.
+JFMは文字の寸法情報と和文組版で自動的に挿入される
+グルー/カーンの寸法情報を持っているLuaスクリプトで,その構造は次の節で述べる.
+%</ja>
+
+%<*en>
Note that the defined control sequence
(\cs{tradmc} in the example above) using \cs{jfont} is not a
\textit{font\_def} token, but a macro.
@@ -3448,22 +3462,129 @@ causes a error. We denote control sequences which are defined in
制御綴を<jfont\_cs>で表す.
%</ja>
-\paragraph{JFM}
+%<en>\paragraph{Specifying JFM}
+%<ja>\paragraph{JFMの指定}
+%<en> The general scheme for specifying a JFM is the following:
+%<ja> JFMの一般的な指定は次のようになっている:
+\begin{quote}
+ \cs{jfont}<jfont\_cs>\texttt{=...;jfm=}<JFM name>[\texttt{/\{}<JFM features>\texttt{\}}]%
+ \texttt{;...;}[\texttt{jfmvar=}<identifier>]\texttt{;...}
+\end{quote}
+
+\begin{figure}
+\begin{LTXexample}[width=0.3\textwidth]
+\ltjsetparameter{differentjfm=both}
+\jfont\F=HaranoAjiMincho-Regular:jfm=ujis
+\jfont\G=HaranoAjiGothic-Medium:jfm=ujis
+\jfont\H=HaranoAjiGothic-Medium:jfm=ujis;jfmvar=hoge
+\F ){\G 【】}( % halfwidth space
+ ){\H 『』}( % fullwidth space
+
+ほげ,{\G 「ほげ」}(ほげ)\par
+ほげ,{\H 「ほげ」}(ほげ)% pTeX-like
+
+\ltjsetparameter{differentjfm=paverage}
+\end{LTXexample}
+\caption{Example of \texttt{jfmvar} key}
+\label{fig:jfmvar}
+\end{figure}
+
%<*en>
-a JFM has measurements of characters and
-glues/kerns that are automatically inserted for Japanese
-typesetting. The structure of JFM will be described in the next
-subsection. At the calling of \cs{jfont}, you must specify
-which JFM will be used for this font by the following keys:
+\begin{description}
+\item[<JFM name>]
+ The name of a (horizontal) JFM. \LuaTeX-ja searches and loads \texttt{jfm-<JFM name>.lua}.
+\item[<JFM features>]
+ An optional comma-separated list of JFM options.
+ Enclosing braces (\verb+{}+) are optional, but this does not escape any characters.
+ The contents of this list can be accessed by a table \texttt{luatexja.jfont.jfm\_feature}
+ from a JFM, at its loading. See \autoref{fig:jfmfeat} for an example.
+
+ Note that any JFM files which is shipped with \LuaTeX-ja does not use this feature.
+\item[<identifier>]
+ An optional string.
+\end{description}
+
+LuaTeX-ja ``does not distinguish'' two Japanese fonts which uses same JFM and are the same size.
+Here ``uses same JFM'' means that all~of <JFM name>, <JFM features>~and~<identifier> of two fonts
+agree.
+
+For example, The first ``)'' and ``【'' in \autoref{fig:jfmvar} are typeset in different real fonts.
+However, because they use the same JFMs and their size are same,
+\LuaTeX-ja inserts penalties, glues and kerns as if these two character are typeset in a same font.
+Namely, the glue between these characters is halfwidth, as in ``)\nobreak【''.
+However, this does not applies with \cs{F}~and~\cs{H} in \autoref{fig:jfmvar},
+because their <identifier> are different.
%</en>
%<*ja>
-JFMは文字の寸法情報と和文組版で自動的に挿入される
-グルー/カーンの寸法情報を持っている.JFMの構造は次の節で述べる.
-\cs{jfont} 命令の呼び出しの際には,どのJFMを用いるのかを以下のキーで
-指定する必要がある:
+\begin{description}
+\item[<JFM name>]
+ (横組用)JFMの名称.\LuaTeX-jaは\texttt{jfm-<JFM name>.lua}というファイルを探索して読み込む.
+\item[<JFM features>]
+ 省略可能なコンマ区切りリスト.全体を囲む \verb+{}+ は省略可能であるが,
+ 囲ったからといって<JFM features>の中で使用可能な文字が増えるわけではない.
+ <JFM features>で指定された内容は,テーブル\texttt{luatexja.jfont.jfm\_feature}として
+ JFM読み込み時に(JFMから)アクセス可能である.\autoref{fig:jfmfeat}に使用例を載せた.
+
+ なお,\LuaTeX-jaが標準で提供するJFMではこの機能は用いられていない.
+\item[<identifier>]
+ 省略可能な文字列.
+\end{description}
+
+\LuaTeX-jaはJFMとサイズが同じで,
+ 実フォントだけが異なる2つの和文フォントは「区別されない」.
+ここで「JFMが同じ」とは,両フォントの<JFM name>, <JFM features>, <identifier>が
+全て一致することである.
+
+例えば\autoref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが,
+JFMもサイズも同じなので,普通に「)\nobreak【」と入力した時と同じように組まれる,つまり両文字の間は半角空きとなる.
+
+しかし,JFMとサイズが同じであっても,\texttt{jfmvar}キーの値<identifier>の異なる
+2つの和文フォント,例えば\autoref{fig:jfmvar}で言う \cs{F} と \cs{H},
+は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て,
+かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば,
+\pTeX と似た状況で組版されることになる.
%</ja>
+\def\T#1{\texttt{#1}}
+\def\printjfmfeat#1{%
+ \relax\texttt{\string#1}:
+ \directlua{%
+ if myjfm then
+ for i,v in pairs(myjfm) do
+ tex.sprint('[\string\\T{' .. i .. '}]${}={}$')
+ if type(v)=='string' then
+ tex.sprint('``\string\\T{' .. tostring(v) .. "}'', ")
+ else
+ tex.sprint(tostring(v) ..', ')
+ end
+ end
+ else tex.sprint('(nil)')
+ end
+ }\par
+}
+\begin{figure}
+\begin{LTXexample}[pos=t]
+\small\ltjsetparameter{differentjfm=both}\tabcolsep=.5\zw
+ % \printjfmfeat is defined in the source of this document
+\jfont\A=HaranoAjiMincho-Regular:jfm=testf at 9pt \printjfmfeat\A
+\jfont\B=HaranoAjiMincho-Bold:jfm=testf/kern=0.5,-ps,+kana at 9pt \printjfmfeat\B
+\jfont\C=HaranoAjiGothic-Regular:jfm=testf/kern=0.5,down=0.2 at 9pt \printjfmfeat\C
+\jfont\D=HaranoAjiGothic-Bold:jfm=testf/down=0.2,kern=0.5 at 9pt \printjfmfeat\D
+\def\TEST#1{\string#1&{#1あ漢}{\A イ字}&{#1あ漢}{\B イ字}&{#1あ漢}{\C イ字}&{#1あ漢}{\D イ字}}
+\vspace{-4\baselineskip}\hfill\ttfamily
+\begin{tabular}{lllll}
+ &\string\A&\string\B&\string\C&\string\D\\\TEST\A\\\TEST\B\\\TEST\C\\\TEST\D\\
+\end{tabular}
+ % No space between ``漢'' and ``イ'' iff two Japanese fonts uses same JFM
+\ltjsetparameter{differentjfm=paverage}
+\end{LTXexample}
+\caption{Example of JFM features}
+\label{fig:jfmfeat}
+\end{figure}
+
+%<en>\paragraph{Default horizontal JFMs}
+%<ja>\paragraph{標準の横組用JFM}
\begin{table}[t]
%<en>\caption{Differences between horizontal JFMs shipped with \LuaTeX-ja}
%<ja>\caption{\LuaTeX-ja に同梱されている横組用JFMの違い}
@@ -3515,27 +3636,16 @@ JFMは文字の寸法情報と和文組版で自動的に挿入される
\ltjsetparameter{jacharrange={-3}}
\end{table}
-\begin{cslist}
-\item[jfm=<name>]
-%<*en>
-Specify the name of (horizontal) JFM.
-If specified JFM has not been loaded, \LuaTeX-ja search and load
-a file named \texttt{jfm-<name>.lua}.
-
-The following horizontal JFMs are shipped with \LuaTeX-ja:
-%</en>
-%<*ja>
-用いる(横組用)JFMの名前を指定する.もし以前に指定されたJFMが読み込まれていなければ,
-\texttt{jfm-<name>.lua}を読み込む.以下の横組用JFMが\LuaTeX-jaには同梱されている:
-%</ja>
+%<en> The following horizontal JFMs are shipped with \LuaTeX-ja.
+%<ja> 以下の横組用JFMが\LuaTeX-jaには同梱されている:
\begin{description}
%<*en>
-\item[\texttt{jfm-ujis.lua}] A standard horizontal JFM in \LuaTeX-ja. This JFM is
+\item[\texttt{jfm-ujis.lua}] A standard horizontal JFM of \LuaTeX-ja. This file is
based on \verb+upnmlminr-h.tfm+, a metric for UTF/OTF package that
is used in \upTeX. When you are going to use the \Pkg{luatexja-otf} package, you should use this JFM.
%</en>
%<*ja>
-\item[\texttt{jfm-ujis.lua}] \LuaTeX-jaの標準JFMである.このJFMは\upTeX で
+\item[\texttt{jfm-ujis.lua}] \LuaTeX-jaの標準JFMファイルであり,このJFMは\upTeX で
用いられるUTF/OTFパッケージ用の和文用TFMである \verb+upnmlminr-h.tfm+ を
元にしている.\Pkg{luatexja-otf}パッケージを使うときはこのJFMを指定するべきである.
%</ja>
@@ -3572,24 +3682,6 @@ The difference among these three~JFMs is shown in \autoref{tab-difjfm}.
\cite{min10}の図3,~4のものを用いた.
%</ja>
-\begin{figure}
-\begin{LTXexample}[width=0.3\textwidth]
-\ltjsetparameter{differentjfm=both}
-\jfont\F=HaranoAjiMincho-Regular:jfm=ujis
-\jfont\G=HaranoAjiGothic-Medium:jfm=ujis
-\jfont\H=HaranoAjiGothic-Medium:jfm=ujis;jfmvar=hoge
-\F ){\G 【】}( % halfwidth space
- ){\H 『』}( % fullwidth space
-
-ほげ,{\G 「ほげ」}(ほげ)\par
-ほげ,{\H 「ほげ」}(ほげ)% pTeX-like
-
-\ltjsetparameter{differentjfm=paverage}
-\end{LTXexample}
-\caption{Example of \texttt{jfmvar} key}
-\label{fig:jfmvar}
-\end{figure}
-
%<*ja>
また,プロポーショナル組用に\texttt{jfm-prop.lua}と\texttt{jfm-propw.lua}も用意されている.
どちらのJFMも文字幅の情報と自動挿入されるグルー・カーンの情報は持たない(つまりグリフの文字幅をそのまま採用する).
@@ -3604,24 +3696,7 @@ Both JFMs don't have any character width information, nor glues/kerns informatio
\texttt{jfm-prop.lua} also also not have character height and depth information, while \texttt{jfm-propw.lua} has them.
%</en>
-%<*en>
-\item[jfmvar=<string>]
-Sometimes there is a need that \ldots.
-%</en>
-%<*ja>
-\item[jfmvar=<string>]
-標準では,JFMとサイズが同じで,
- 実フォントだけが異なる2つの和文フォントは「区別されない」.例えば
-\autoref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが,
-JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる.
-しかし,JFMとサイズが同じであっても,\texttt{jfmvar} キーの異なる
-2つの和文フォント,例えば\autoref{fig:jfmvar}で言う \cs{F} と \cs{H},
-は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て,
-かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば,
-\pTeX と似た状況で組版されることになる.
-%</ja>
-\end{cslist}
\begin{figure}
\begin{LTXexample}[pos=t]
@@ -3679,7 +3754,6 @@ NFSS2用の命令(\ref{ssec:chgfnt}節,\ref{ssec:nfsspat}節)における
%</ja>
%<*ja>
-\newpage
\paragraph{\texttt{extend}と\texttt{slant}}
OpenType機能と見かけ上同じような形式で指定できるものに,
\begin{description}
@@ -3702,7 +3776,7 @@ The following setting can be specified as OpenType font features:
Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant}
settings; one have to write new JFMs on purpose.
For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence
-letter-spacing and the width of italic correction are not correct:
+the letterspacing and the width of italic corrections are not correct:
%</en>
\begin{LTXexample}[width=0.3\textwidth]
\jfont\E=HaranoAjiMincho-Regular:extend=1.5;jfm=ujis;-kern
@@ -3711,7 +3785,7 @@ letter-spacing and the width of italic correction are not correct:
\end{LTXexample}
%<*ja>
-\paragraph{\texttt{ltjksp}指定}
+\paragraph{\texttt{ltjksp}「機能」}
\label{pg:ltjksp}
\LuaTeX-ja標準では,
JFM中における\texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
@@ -3729,7 +3803,7 @@ JFM中における\texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
最後に指定したものが有効となる.
%</ja>
%<*en>
-\paragraph{\texttt{ltjksp}}
+\paragraph{\texttt{ltjksp} ``feature''}
\label{pg:ltjksp}
\texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
\texttt{kanjiskip\_shrink} keys (Page~\pageref{pg:ksp_nat}) makes tha
@@ -3748,13 +3822,10 @@ as shown in~\autoref{fig:ltjksp}.
\G\leavevmode%
\vrule\hbox to 15\zw{あ「い」う,えお}\vrule
\end{LTXexample}
-\caption{\texttt{ltjksp}}
+\caption{\texttt{ltjksp} `feature''}
\label{fig:ltjksp}
\end{figure}
-
-
-
%<en>\subsection{\cs{tfont}}
%<ja>\subsection{\cs{tfont} 命令}
\label{ssec:tfont}
@@ -3809,13 +3880,13 @@ as shown in~\autoref{fig:ltjksp}.
%<*en>
\cs{tfont} loads a font as a Japanese font for vertical direction.
-This command admits the same syntax used in \cs{font}~and~\cs{jfont}.
+This command admits the same syntax as in \cs{font}~and~\cs{jfont}.
A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont}:
\begin{itemize}
\item OpenType Feature~\texttt{vrt2}%
- \footnote{If the font does not define \texttt{vrt2} feature,
+ \footnote{If the font does not define the \texttt{vrt2} feature,
\texttt{vert} is used instead.} is automatically activated,
- unless \texttt{vert}~and//or~\texttt{vrt2} are explicitly activated
+ unless \texttt{vert}~and//or~\texttt{vrt2} features are explicitly activated
or deactivated (as the second line in the example below).
\begin{lstlisting}
\tfont\S=HaranoAjiMincho-Regular:jfm=ujisv % vrt2 is automatically activated
@@ -3833,7 +3904,7 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
\item Furthermore, a glyph is automatically rotated 90~degrees,
if it is not replaced by \texttt{vert} feature for \emph{any} script
for \emph{any} language, and if it is marked as `r''~or~``Tr'' in UAX~\#50.
- \item One have to specify the name of vertical JFM in \texttt{jfm=<name>}.
+ \item \cs{tfont} uses a vertical JFM instead of a horizontal JFM.
\LuaTeX-ja ships following vertical JFMs:
\begin{description}
\item[\texttt{jfm-ujisv.lua}] A standard vertical JFM in \LuaTeX-ja. This JFM is
@@ -3865,12 +3936,12 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
%</en>
%<*ja>
\cs{tfont} はフォントを縦組用の和文フォントとして読み込む命令であり,
-\cs{tfont} の文法は \cs{jfont} と同じである.
-\cs{tfont} で定義された縦組用和文フォントは,
-以下の点が \cs{jfont} による横組用和文フォントとは異なる:
+\cs{tfont}の構文は\cs{jfont}と同様である.
+\cs{tfont}で定義された縦組用和文フォントは,
+以下の点が\cs{jfont}による横組用和文フォントとは異なる:
\begin{itemize}
- \item 明示的に \texttt{vert}, \texttt{vrt2}(のいずれか)の
- 有効・無効を指定した場合を除き,自動的に OpenType機能 \texttt{vrt2} の有効化が
+ \item 明示的にOpenType機能\texttt{vert}, \texttt{vrt2}(のいずれか)の
+ 有効・無効を指定した場合を除き,自動的にOpenType機能\texttt{vrt2}の有効化が
指定されたものとみなされる
\footnote{もしフォントが\texttt{vrt2}を定義していなかった場合,代わりに
\texttt{vert}を用いる.}.
@@ -3880,7 +3951,7 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
\tfont\U=file:ipaexm.ttf:jfm=ujisv
% vert is automatically activated, since this font does not have vrt2
\end{lstlisting}
- \item \texttt{vert}, \texttt{vrt2} の少なくとも一つの有効を指定した場合にも関わらず,
+ \item \texttt{vert}, \texttt{vrt2}の少なくとも一つの有効を指定した場合にも関わらず,
script tagとlanguage system identifierの値の組み合わせによって
実際には有効にならなかった場合,\LuaTeX-jaは
\begin{quote}
@@ -3896,7 +3967,7 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
\item さらに,「いかなるscript,~languageでも\texttt{vert}により置換されない」グリフ
のうち,UAX~\#50で``r''もしくは``Tr''と指定されているものは90度自動回転させる.
\item \ref{ssec:math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない.
- \item \texttt{jfm=<name>}\ の部分には縦組用JFMを指定する.
+ \item <JFM name>には縦組用JFMを指定する.
以下の縦組用JFMが\LuaTeX-jaには同梱されている.%おり,違いを\autoref{tab-difjfm-tate}に示した.
\begin{description}
\item[\texttt{jfm-ujisv.lua}] \LuaTeX-jaの標準縦組用JFMである.このJFMは\upTeX で
@@ -6232,7 +6303,7 @@ g,\char`g,\ltjalchar`g,\ltjjachar`g % ALchar unless \ltjjachar
%<*en>
\subsection{Loading Japanese fonts in \LaTeXe}
\label{ssec:ltx-jfm}
-From versoin~20190107,
+From version~20190107,
\emph{\LuaTeX-ja does not load Japanese fonts for horizontal direction and
that for vertical direction at same time},
to reduce the number of loaded fonts.
diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-fontspec.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-fontspec.sty
index 60c4c75a31..19d9952fef 100644
--- a/macros/luatex/generic/luatexja/src/addons/luatexja-fontspec.sty
+++ b/macros/luatex/generic/luatexja/src/addons/luatexja-fontspec.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec}[2020-04-01 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec}[2020-09-14 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
@@ -23,7 +23,7 @@
pass .code:n = \PassOptionsToPackage{#1} {fontspec},
% 互換性のために残したオプション
scale .code:n = \gdef\Cjascale{#1},
- unknown .code:n = \PassOptionsToPackage { \l_keys_key_tl } {fontspec},
+ unknown .code:n = \PassOptionsToPackage { \l_keys_key_str } {fontspec},
}
\ProcessKeysOptions{ luatexja-fontspec }
diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
index 279ebb09b7..b0ce39bf5d 100644
--- a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
+++ b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
@@ -1,5 +1,5 @@
% luatexja-preset.sty
-\ProvidesPackage{luatexja-preset}[2020-06-14 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2020-09-14 Japanese font presets]
\RequirePackage{expl3,l3keys2e}
\RequirePackage{luatexja}
@@ -34,12 +34,9 @@
\keys_define:nn { luatexja-preset }{
unknown .code:n =
- \keys_set_known:noN { ltjpreset-presets } { \tl_use:N \l_keys_tl } \l_tmpa_tl
- \tl_if_empty:NT \l_tmpa_tl {
- \PassOptionsToPackage { \l_tmpa_tl } { luatexja-fontspec }
- },
+ \PassOptionsToPackage { \l_keys_key_str } { luatexja-fontspec },
scale .code:n = \gdef\Cjascale{#1},
- match .code: n =
+ match .code:n =
\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue
\PassOptionsToPackage { match } { luatexja-fontspec },
match .value_forbidden:n = true,
diff --git a/macros/luatex/generic/luatexja/src/lltjext.sty b/macros/luatex/generic/luatexja/src/lltjext.sty
index d19db9ab61..fa3d0720b0 100644
--- a/macros/luatex/generic/luatexja/src/lltjext.sty
+++ b/macros/luatex/generic/luatexja/src/lltjext.sty
@@ -692,7 +692,7 @@
\everypar{}}%
}%
}%
- \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<z>}}
+ \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<Z>}}
\def\p@array<##1>[##2]##3{%
\let\box@dir\relax
\if ##1z\relax
diff --git a/macros/luatex/generic/luatexja/src/ltj-jfont.lua b/macros/luatex/generic/luatexja/src/ltj-jfont.lua
index d1751af465..d95b34a511 100644
--- a/macros/luatex/generic/luatexja/src/ltj-jfont.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-jfont.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfont',
- date = '2020-07-30',
+ date = '2020-09-16',
description = 'Loader for Japanese fonts',
})
@@ -42,7 +42,7 @@ local font_metric_table = ltju.font_metric_table -- [font number] -> jfm_name, j
luatexbase.create_callback("luatexja.load_jfm", "data", function (ft, jn) return ft end)
-local jfm_file_name, jfm_var, jfm_ksp
+local jfm_spec, jfm_name, jfm_var, jfm_ksp
local defjfm_res
local jfm_dir, is_def_jfont, vert_activated, auto_enable_vrt2
@@ -177,7 +177,7 @@ function luatexja.jfont.define_jfm(to)
t.chars.nox_alchar = t.chars.jcharbdd
t.chars.glue = t.chars.jcharbdd
end
- t = luatexbase.call_callback("luatexja.load_jfm", t, jfm_file_name)
+ t = luatexbase.call_callback("luatexja.load_jfm", t, jfm_spec, luatexja.jfont.jfm_feature)
t.size_cache = {}
defjfm_res = t
end
@@ -279,25 +279,21 @@ end
-- LOADING JAPANESE FONTS
------------------------------------------------------------------------
-local load_jfont_metric
+local load_jfont_metric, check_callback_order
do
local cstemp
local global_flag -- true if \globaljfont, false if \jfont
load_jfont_metric = function()
- if jfm_file_name=='' then
- ltjb.package_error('luatexja',
- 'no JFM specified',
+ if jfm_name=='' then
+ ltjb.package_error('luatexja', 'no JFM specified',
'To load and define a Japanese font, a JFM must be specified.'..
"The JFM 'ujis' will be used for now.")
- jfm_file_name = 'ujis'
+ jfm_name, jfm_spec = 'ujis', 'ujis'
end
- for j,v in ipairs(metrics) do
- if v.name==jfm_file_name then return j end
- end
- luatexja.load_lua('jfm-' .. jfm_file_name .. '.lua')
+ for j,v in ipairs(metrics) do if v.name==jfm_spec then return j end end
+ luatexja.load_lua('jfm-' .. jfm_name .. '.lua')
if defjfm_res then
- defjfm_res.name = jfm_file_name
- table.insert(metrics, defjfm_res)
+ defjfm_res.name = jfm_spec; table.insert(metrics, defjfm_res)
return #metrics
else
return nil
@@ -323,8 +319,7 @@ do
local fn = font.id(cstemp)
local f = font_getfont(fn)
if not j then
- ltjb.package_error('luatexja',
- "bad JFM `" .. jfm_file_name .. "'",
+ ltjb.package_error('luatexja', "bad JFM `" .. jfm_name .. "'",
'The JFM file you specified is not valid JFM file.\n'..
'So defining Japanese font is cancelled.')
tex.sprint(cat_lp, global_flag, '\\expandafter\\let\\csname ',
@@ -333,7 +328,7 @@ do
return
end
if not f then return end
- update_jfm_cache(j, f.size)
+ update_jfm_cache(j, f.size); check_callback_order()
local sz = metrics[j].size_cache[f.size]
local fmtable = { jfm = j, size = f.size, var = jfm_var,
with_kanjiskip = jfm_ksp,
@@ -352,11 +347,30 @@ do
tex.sprint(cat_lp, global_flag, '\\protected\\expandafter\\def\\csname ',
(cstemp==' ') and '\\space' or cstemp, '\\endcsname{\\ltj@cur'..
(jfm_dir == 'yoko' and 'j' or 't') .. 'fnt', fn, '\\relax}')
- jfm_file_name = nil
+ jfm_spec = nil
end
end
do
+ local ltb = luatexbase
+ local to_be_checked = { 'pre_linebreak_filter', 'hpack_filter' }
+ check_callback_order = function()
+ for i,n in pairs(to_be_checked) do
+ local lotf_cb = ltb.priority_in_callback(n, 'luaotfload.letterspace')
+ local ltj_cb = ltb.priority_in_callback(n, 'ltj.main')
+ if lotf_cb then
+ to_be_checked[i]=nil
+ if ltj_cb<lotf_cb then
+ local f = ltb.remove_from_callback(n,'luaotfload.letterspace')
+ ltb.add_to_callback(n, f, 'luaotfload.letterspace',
+ ltb.priority_in_callback(n, 'luaotfload.node_processor') + 1)
+ end
+ end
+ end
+ end
+end
+
+do
local get_dir_count = ltjd.get_dir_count
local dir_tate = luatexja.dir_table.dir_tate
local tex_get_attr = tex.getattribute
@@ -374,54 +388,78 @@ do
end
do
- local gmatch = string.gmatch
- -- extract jfm_file_name and jfm_var
+ local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
+ local lpegmatch = lpeg.match
+ local C, Cc, Cf, Ct, Cg = lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Ct, lpeg.Cg
+ local Cs, B = lpeg.Cs, lpeg.B
+ local spacing = S" \t\v"
+ local ws = spacing^0
+ local slash = P'/'
+ local semicolon = P';'
+ local comma = P','
+ local equals = P'='
+ local jf_field_char = 1 - S'/{};,='
+ local jf_field = C(jf_field_char^1)
+ local jf_assignment = jf_field * equals * jf_field
+ local jf_switch = P'-' * jf_field * Cc(false) + P'+'^-1 * jf_field * Cc(true)
+ local jf_feature_expr = Cg(jf_assignment + jf_switch) * comma^0
+ local jf_feature_list = P'{' * jf_feature_expr^0 * P'}' + jf_feature_expr^0
+ local jf_list = C((1-slash)^1) * (slash * Cf(Ct'' * jf_feature_list, rawset))^-1
+ local jf_value = (1 - semicolon)^1
+ local function rem(name,value)
+ if name=='jfm' then
+ local flag, t; jfm_name, t = lpegmatch(jf_list, value)
+ if type(t)=='table' then
+ for i,v in pairs(t) do
+ flag=true
+ if v=='true' then t[i]=true elseif v=='false' then t[i]=false end
+ end
+ end
+ luatexja.jfont.jfm_feature = flag and t
+ elseif name=='jfmvar' then jfm_var = value end
+ return ''
+ end
+ local jf_remainder = Cs( ( ( B(S':;') *
+ C(P'jfm' * P'var'^-1) * ws * equals * ws * C(jf_value) * semicolon^-1 ) / rem +1 )^0 )
+
+ local parser=luaotfload.parsers.font_request
+ function is_feature_specified(s,fname)
+ local t = lpegmatch(parser,s); return t and t.features and t.features[fname]
+ end
+ -- extract jfm_name, jfm_spec and jfm_var
-- normalize position of 'jfm=' and 'jfmvar=' keys
- local function extract_metric(name)
+ local function extract_jfm_spec(name)
name = (name:match '^{(.*)}$') or (name:match '^"(.*)"$') or name
- jfm_file_name = ''; jfm_var = ''; jfm_ksp = true
+ jfm_spec, jfm_var = '', ''
local tmp, index = name:sub(1, 5), 1
if tmp == 'file:' or tmp == 'name:' or tmp == 'psft:' then
index = 6
end
- local p = name:find(":", index); index = p and (p+1) or index
- while index do
- local l = name:len()+1
- local q = name:find(";", index) or l
- if name:sub(index, index+3)=='jfm=' and q>index+4 then
- jfm_file_name = name:sub(index+4, q-1)
- if l~=q then
- name = name:sub(1,index-1) .. name:sub(q+1)
- else
- name = name:sub(1,index-1); index = nil
- end
- elseif name:sub(index, index+6)=='jfmvar=' and q>index+6 then
- jfm_var = name:sub(index+7, q-1)
- if l~=q then
- name = name:sub(1,index-1) .. name:sub(q+1)
- else
- name = name:sub(1,index-1); index = nil
+ name = lpegmatch(jf_remainder, name)
+ if jfm_name~='' then
+ if luatexja.jfont.jfm_feature then
+ local l, t2 = name:sub(-1), {}
+ for i,v in pairs(luatexja.jfont.jfm_feature) do
+ -- print(i,type(v),v)
+ t2[#t2+1] = (v==true) and i
+ or ((v==false) and ('-'..i) or (i..'='..tostring(v)))
end
+ table.sort(t2); jfm_spec = jfm_name .. '/{' .. table.concat(t2, ',') .. '}'
else
- index = (l~=q) and (q+1) or nil
+ jfm_spec = jfm_name
end
- end
- if jfm_file_name~='' then
- local l = name:sub(-1)
- name = name
- .. ((l==':' or l==';') and '' or ';')
- .. 'jfm=' .. jfm_file_name
+ l = name:sub(-1)
+ name = name .. ((l==':' or l==';') and '' or ';') .. 'jfm=' .. jfm_spec
if jfm_var~='' then
name = name .. ';jfmvar=' .. jfm_var
end
+ -- print('NN>', name)
end
- for x in gmatch (name, "[:;]([+%%-]?)ltjks") do
- jfm_ksp = not (x=='-')
- end
+ jfm_ksp = (is_feature_specified(name,'ltjksp')~=false)
if jfm_dir == 'tate' then
- vert_activated = (not name:match '[:;]%-vert') and (not name:match '[:;]%-vrt2')
+ vert_activated = (is_feature_specified(name,'vert')~=false) and (is_feature_specified(name,'vrt2')~=false)
auto_enable_vrt2
- = (not name:match '[:;][+%-]?vert') and (not name:match '[:;][+%-]?vrt2')
+ = (is_feature_specified(name,'vert')==nil) and (is_feature_specified(name,'vrt2')==nil)
else
vert_activated, auto_enable_vrt2 = nil, nil
end
@@ -432,7 +470,7 @@ do
local otfl_fdr
local ltjr_font_callback = ltjr.font_callback
function luatexja.font_callback(name, size, id)
- local new_name = is_def_jfont and extract_metric(name) or name
+ local new_name = is_def_jfont and extract_jfm_spec(name) or name
is_def_jfont = false
local res = ltjr_font_callback(new_name, size, id, otfl_fdr)
luatexbase.call_callback('luatexja.define_font', res, new_name, size, id)
@@ -447,7 +485,7 @@ do
local function load_jfmonly()
local spec, size = match(scan_arg(), '(.+)%s+at%s*([%.%w]*)')
local dir = scan_arg()
- size = sp(size); extract_metric(spec)
+ size = sp(size); extract_jfm_spec(spec)
jfm_dir = dir
local i = load_jfont_metric()
local j = -update_jfm_cache(i, size)
diff --git a/macros/luatex/generic/luatexja/src/ltj-kinsoku.tex b/macros/luatex/generic/luatexja/src/ltj-kinsoku.tex
index d5b9c183b7..a0fd69a864 100644
--- a/macros/luatex/generic/luatexja/src/ltj-kinsoku.tex
+++ b/macros/luatex/generic/luatexja/src/ltj-kinsoku.tex
@@ -366,6 +366,7 @@
\ltjsetparameter{jaxspmode={`.,postonly}}
\ltjsetparameter{jaxspmode={`;,postonly}}
\ltjsetparameter{jaxspmode={`?,postonly}}
+\ltjsetparameter{jaxspmode={`!,postonly}}
\ltjsetparameter{jaxspmode={`),postonly}}
\ltjsetparameter{jaxspmode={`(,preonly}}
\ltjsetparameter{jaxspmode={`],postonly}}
@@ -464,5 +465,5 @@
\directlua{%
local s = table.copy(luatexja.stack.charprop_stack_table[0])
- luatexja.base.save_cache('ltj-kinsoku_default', {s, version=1})
+ luatexja.base.save_cache('ltj-kinsoku_default', {s, version=2})
}
diff --git a/macros/luatex/generic/luatexja/src/luatexja.lua b/macros/luatex/generic/luatexja/src/luatexja.lua
index 074d050276..be2b285880 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.lua
+++ b/macros/luatex/generic/luatexja/src/luatexja.lua
@@ -348,7 +348,7 @@ do
end
do
- local cache_ver = 1 -- must be same as ltj-kinsoku.tex
+ local cache_ver = 2 -- 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/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty
index 0f16a8c190..2bb9f0db4f 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja.sty
@@ -35,13 +35,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2020-08-08 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2020-09-19 Japanese Typesetting with Lua(La)TeX]
\DeclareOption{disablejfam}{\ltj@disablejfamtrue}
\DeclareOption*{}
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20200808.0}
+\def\LuaTeXjaversion{20200919.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty
index a6b71f3b6a..e858a8a957 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2019/09/26 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2020-09-13 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
\def\cleardoublepage{\clearpage\if@twoside
@@ -239,11 +239,13 @@
\ifmmode\@@underline{#1}%
\else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi}
-%%% AtBeginDvi
+%%% 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
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty
index 8512023874..a4b340136a 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty
@@ -4,7 +4,7 @@
\newif\ifltj@ltshipout@avail
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-atbegshi}[2020-08-08 Patching \string\shipout\space hooks for LuaTeX-ja]
+\ProvidesPackage{lltjp-atbegshi}[2020-09-13 Patching \string\shipout\space hooks for LuaTeX-ja]
\@ifl@t@r\fmtversion{2020-10-01}{%
\ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltshipout@availtrue\fi
\else\ltj@ltshipout@availtrue\fi
@@ -19,13 +19,14 @@
\RequirePackage{expl3}
\ExplSyntaxOn\makeatletter
\box_new:N \l__platex_shipout_dummy_box
-\pretocmd {\__shipout_execute_cont:}
- {\tex_setbox:D \l__platex_shipout_dummy_box \tex_vbox:D \c_group_begin_token \yoko } {} {}
-\apptocmd {\__shipout_execute_cont:} {\c_group_end_token} {} {}
+\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
%</ltshipout>-----------------------------------
-\else
+\expandafter\endinput
+\fi
\AtBeginShipoutInit
%<*atbegshi>-------------------------------------
% patching atbegshi.sty
@@ -89,5 +90,4 @@
\endgroup
%% internal macros are no longer effective
%</atbegshi>-------------------------------------
-\fi
\endinput
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
index eba249fa5e..161029bd05 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-geometry.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-geometry}[2020-08-05 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2020-09-18 Patch to geometry for LuaTeX-ja with vertical writing mode]
\RequirePackage{expl3}
\ifdefined\if@ltj@@geometry@tate\expandafter\endinput\fi
\newif\if@ltj@@geometry@tate
@@ -82,6 +82,7 @@
\if@ltj@@geometry@forceoff
\@ltj@@geometry@tatefalse
\else
+ \@ltj@@geometry@tatetrue
\let\PackageWarningNoLine\@gobbletwo% 警告抑止
\fi
}