texlive[72546] Master/texmf-dist: luatexja (14oct24)
commits+karl at tug.org
commits+karl at tug.org
Mon Oct 14 21:10:46 CEST 2024
Revision: 72546
https://tug.org/svn/texlive?view=revision&revision=72546
Author: karl
Date: 2024-10-14 21:10:45 +0200 (Mon, 14 Oct 2024)
Log Message:
-----------
luatexja (14oct24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/luatex/luatexja/README
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README 2024-10-14 19:10:45 UTC (rev 72546)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20240909.0
+The LuaTeX-ja Package 20241014.0
--------------------------------
Copyright (c) 2011--2024 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -42,7 +42,7 @@
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20240909.0 in the Git repository by
+ or tagged as 20241014.0 in the Git repository by
<https://github.com/luatexja/luatexja/archive/refs/tags/$VER.zip>
b. Extract the archive and process following three files by LuaLaTeX
@@ -92,4 +92,4 @@
This file and ltj-kinsoku.lua are not used anymore.
(Do not remove ltj-kinsoku.tex.)
-Last commit date: Mon Sep 9 05:16:53 2024 +0900
+Last commit date: Mon Oct 14 10:29:57 2024 +0900
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx 2024-10-14 19:10:45 UTC (rev 72546)
@@ -3762,9 +3762,9 @@
\jfont\hoge=hogem:jfm=ujis;-kern at 3.5mm % ==> kern 無効(明示)
\jfont\hoge=hogem:jfm=ujis at 3.5mm % ==> kern 有効(暗黙)
\jfont\hoge=hogem:jfm=ujis;+kern at 3.5mm % ==> kern 有効(明示)
-\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=-ujis}{} % ==> kern 無効(明示)
-\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=ujis}{} % ==> kern 有効(暗黙)
-\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=ujis+kern}{}% ==> kern 有効(明示)
+\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=ujis;-kern}{} % ==> kern 無効(明示)
+\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=ujis}{} % ==> kern 有効(暗黙)
+\DeclareFontShape{JY3}{fuga}{m}{n}{<-> s*hogem:jfm=ujis;+kern}{} % ==> kern 有効(明示)
\end{lstlisting}
\item バージョン20220411.0以降では,\LuaTeX-ja読み込み時や,\Pkg{ltjclasses}, \Pkg{ltjsclasses}において
@@ -3775,7 +3775,7 @@
\ltj at stdmcfont:-kern;jfm=\ltj at stdyokojfm}{}
\end{lstlisting}
とOpenType機能\texttt{kern}を明示的に無効化した状態で定義する.
- これは標準JFM(\texttt{jfm-ujis.lua}, \texttt{jfm-ujisv.lua})が
+ これは標準JFM\ (\texttt{jfm-ujis.lua}, \texttt{jfm-ujisv.lua})が
フォント由来のカーニングが入ることを期待していないためである.
\item
@@ -4862,7 +4862,7 @@
%<*ja>
(任意,バージョン2以降)
-優先順位付き行長調整が有効であり,かつ現在の文字クラスの文字が
+ 行末文字の位置調整が有効であり,かつ現在の文字クラスの文字が
行末に来た時に,この文字と行末の間には指定された値のいずれかの大きさのカーンが
挿入される(\autoref{ssec:adj}参照).
@@ -7629,7 +7629,7 @@
\item[「中身までみた」行送り計算]
複数行に渡る文章を組版するときには行間に空きが入ることが普通である.
\TeX では各行が一つずつの水平ボックスをなしていることを思い出すと,隣り合った
- 2つの行(つまり水平ボックス)の間の空きは次のようにして決まるのだった:
+ 2\nobreak つの行(つまり水平ボックス)の間の空きは次のようにして決まるのだった:
\begin{itemize}
\item 「通常に組んだときの行間」$d$を,\cs{baselineskip}から
「前の行」の深さと「次の行」の高さを加えたものを引いた値とする.
@@ -11296,7 +11296,16 @@
なお,段落の末尾には\cs{penalty10000}と\cs{parfillskip}由来のグルーが自動的に入るが,
これらとの兼ね合いのため\emph{最後のクラスタについては上記のノード挿入処理は行われない}.
-段落最終行の行末文字の位置調整は,すでに述べた「行分割後の場合」における最終行の処理をそのまま用いている.
+段落最終行の行末文字の位置調整は,すでに述べた「行分割後の場合」における最終行の処理を流用しているが,
+そのままでは「段落末尾をぶら下げ組($a_1=-0.5$)にする」ことができない
+\footnote{通常時は\cs{parfillskip}の内容は\texttt{0pt plus 1fil}であるため,
+ 負の長さになることはない.これに伴って,「段落末尾はぶら下げ組が望ましい」状況であっても,
+ 実際には末尾の句点(とその前の数文字)がまとめて次の行に追い出されてしまう.}ため,
+\begin{itemize}
+ \item 段落末尾の\cs{penalty10000}\cs{parfillskip}の直前に,$a_1\text{\cs{zw}}$のカーンを挿入する
+ \item 行分割後,行末文字の位置調整を行う前に,そのカーンを削除する
+\end{itemize}
+という前処理を追加している.
\subsection{グルーの調整}
$|\textit{total}|$の分だけが,行中のグルーの伸び量,あるいは縮み量に応じて負担されることになる.
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua 2024-10-14 19:10:45 UTC (rev 72546)
@@ -37,6 +37,7 @@
local get_attr = node.direct.get_attribute
local set_attr = node.direct.set_attribute
local insert_after = node.direct.insert_after
+local node_remove = node.direct.remove
local id_glyph = node.id 'glyph'
local id_kern = node.id 'kern'
@@ -205,7 +206,7 @@
-- step 1 最終行用
local min, max = math.min, math.max
local setsubtype = node.direct.setsubtype
-local function aw_step1_last(p, total)
+local function aw_step1_last(p, total, removed_le)
local head = getlist(p)
local x = node_tail(head); if not x then return total, false end
-- x: \rightskip
@@ -246,6 +247,7 @@
-- 続行条件2: min(eadt[1], 0)<= \parfillskip <= max(eadt[#eadt], 0)
local pfw = getwidth(pf)
+ (total>0 and getfield(pf, 'stretch') or -getfield(pf, 'shrink')) *getfield(p, 'glue_set')
+ + removed_le
if pfw<min(0,eadt[1]) or max(0,eadt[#eadt])<pfw then return total, false end
-- \parfillskip を 0 にする
total = total + getwidth(pf)
@@ -393,6 +395,21 @@
end
end
end
+local insert_lineend_kern_tail
+do
+ local insert_before = node.direct.insert_before
+ local KINSOKU = luatexja.icflag_table.KINSOKU
+ insert_lineend_kern_tail = function (head, nq, last)
+ if nq.met then
+ local eadt = nq.met.char_type[nq.class].end_adjust
+ if eadt and eadt[1]<0 then
+ local x = node_new(id_kern, 1)
+ setkern(x, eadt[1]); set_attr(x, attr_icflag, LINEEND)
+ insert_before(head, node_prev(last), x)
+ end
+ end
+ end
+end
local adjust_width
do
@@ -408,7 +425,15 @@
last_p = p
end
if last_p then
- myaw_step2(last_p, myaw_step1_last(last_p, get_total_stretched(last_p)))
+ local removed_le = 0
+ local p = getlist(last_p); local pf = node_prev(node_tail(p))
+ if getid(pf) == id_glue and getsubtype(pf) == 15 then
+ pf = node_prev(node_prev(pf))
+ if getid(pf) == id_kern and get_attr_icflag(pf)==LINEEND then
+ removed_le = getwidth(pf); node_remove(p, pf); node_free(pf)
+ end
+ end
+ myaw_step2(last_p, myaw_step1_last(last_p, get_total_stretched(last_p), removed_le))
end
return to_node(head)
end
@@ -426,6 +451,7 @@
if status_le==2 then
if not luatexbase.in_callback('luatexja.adjust_jfmglue', 'luatexja.adjust') then
ltjb.add_to_callback('luatexja.adjust_jfmglue', insert_lineend_kern, 'luatexja.adjust')
+ ltjb.add_to_callback('luatexja.adjust_jfmglue_tail', insert_lineend_kern_tail, 'luatexja.adjust')
end
myaw_step1, myaw_step1_last = dummy, aw_step1_last
else
@@ -435,7 +461,8 @@
myaw_step1, myaw_step1_last = aw_step1, aw_step1_last
end
if luatexbase.in_callback('luatexja.adjust_jfmglue', 'luatexja.adjust') then
- luatexbase.remove_from_callback('luatexja.adjust_jfmglue', 'luatexja.adjust')
+ luatexbase.remove_from_callback('luatexja.adjust_jfmglue', 'luatexja.adjust')
+ luatexbase.remove_from_callback('luatexja.adjust_jfmglue_tail', 'luatexja.adjust')
end
end
myaw_step2 = (status_pr>0) and aw_step2 or aw_step2_dummy
@@ -560,7 +587,6 @@
do
local ltja = luatexja.adjust
local sid_user = node.subtype 'user_defined'
- local node_remove = node.direct.remove
local node_write = node.direct.write
local getvalue = node.direct.getdata
local setvalue = node.direct.setdata
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua 2024-10-14 19:10:45 UTC (rev 72546)
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2024-09-01',
+ date = '2024-10-12',
description = 'Insertion process of JFM glues, [x]kanjiskip and others',
})
luatexja.jfmglue = luatexja.jfmglue or {}
@@ -587,7 +587,7 @@
if k then return lp end
end
end
- Np=nil
+ Np = nil
end
end -- 001 -----------------------------------------------
@@ -693,6 +693,7 @@
-------------------- 最下層の処理
luatexbase.create_callback('luatexja.adjust_jfmglue', 'simple', function(n) return n end)
+luatexbase.create_callback('luatexja.adjust_jfmglue_tail', 'simple', function(n) return n end)
-- change penalties (or create a new penalty, if needed)
local function handle_penalty_normal(post, pre, g)
@@ -1138,6 +1139,7 @@
adjust_nq()
if mode then
-- the current list is to be line-breaked.
+ call_callback('luatexja.adjust_jfmglue_tail', head, Nq, last)
-- Insert \jcharwidowpenalty
if widow_Np.first then handle_penalty_jwp() end
else
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty 2024-10-14 19:10:45 UTC (rev 72546)
@@ -68,7 +68,7 @@
\expandafter\let\csname ifltj at in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2023-04-06 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2023-10-07 Core of LuaTeX-ja]
\endlinechar=13 %
\RequirePackage{infwarerr}
\endlinechar=-1 %
@@ -774,10 +774,9 @@
%%------------------ Load module for the format
-
\directlua{luatexja.load_kinsoku()}
\ifltj at in@latex %<*LaTeX>
- \RequirePackage{ltj-latex}
+ \usepackage{ltj-latex}
\else\ifltj at in@plain %<*plain>
\input ltj-plain.sty %
\fi\fi %</LaTeX|plain>
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty 2024-10-14 19:10:23 UTC (rev 72545)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty 2024-10-14 19:10:45 UTC (rev 72546)
@@ -27,7 +27,7 @@
\newif\ifltj at disablejfam
%%%% VERSION
-\def\LuaTeXjaversion{20240909.0}
+\def\LuaTeXjaversion{20241014.0}
%% Check if LaTeX is used.
\begingroup\expandafter\expandafter\expandafter\endgroup
More information about the tex-live-commits
mailing list.