texlive[61981] Master/texmf-dist: luatexja (11feb22)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 11 22:54:49 CET 2022


Revision: 61981
          http://tug.org/svn/texlive?view=revision&revision=61981
Author:   karl
Date:     2022-02-11 22:54:49 +0100 (Fri, 11 Feb 2022)
Log Message:
-----------
luatexja (11feb22)

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/addons/luatexja-adjust.sty
    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.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-02-11 21:54:49 UTC (rev 61981)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20220207.0
+The LuaTeX-ja Package 20220211.0
 --------------------------------
 Copyright (c) 2011--2022 The LuaTeX-ja project
 License: modified BSD (see COPYING)
@@ -42,9 +42,9 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20220207.0 in the Git repository by
+      or tagged as 20220211.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20220207.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20220211.0;sf=tgz>
 
    b. Extract the archive and process following three files by LuaLaTeX
       to generate classes for Japanese typesetting:
@@ -93,4 +93,4 @@
   This file and ltj-kinsoku.lua are not used anymore.
   (Do not remove ltj-kinsoku.tex.)
 
-Last commit date: Mon Feb 7 13:14:19 2022 +0900
+Last commit date: Fri Feb 11 07:50:08 2022 +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	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2022-02-11 21:54:49 UTC (rev 61981)
@@ -7838,20 +7838,46 @@
   初期値は1(つまり\cs{lineskip}(の自然長))である.
 \end{cslist}
 
-さらに,バージョン20220207.0以降では次の命令が提供される:
+さらに,バージョン20220211.0以降では次の命令が提供される.
 \begin{cslist}
-  \item[\cs{ltjghostjachar}]
+  \item[\cs{ltjghostbeginjachar}]
   \LuaTeX-ja本体が提供している\cs{ltjfakeparbegin}, \cs{ltjfakeboxbdd}と類似の命令である.
   実行された箇所が(限定・非限定を問わず)水平モードであった場合に,実行された箇所は
-  「文字クラス0の\textbf{JAchar}」の直前かつ直後であると,\LuaTeX-jaの和文処理グルー挿入処理に認識させる.
+  「文字クラス0の\textbf{JAchar}」の直前であると,
+  \LuaTeX-jaの和文処理グルー挿入処理に認識させる.以下の実行例を参照.
 
-  主な仕様用途は和文ゴーストでの使用である.\Pkg{BXghost}パッケージ(\cite{bxghost})などでは
-  伝統的に全角空白(\texttt{U+3000})と\verb+\kern-1\zw+を組み合わせた方法が使われてきたが,
-  \LuaTeX-jaでは全角空白を使っただけではうまくいかない可能性があるため,新たに命令が用意された.
+\medskip
+\begin{LTXexample}[width=18\zw]
+\ltjsetparameter{kanjiskip=14pt,xkanjiskip=50pt}
+\let\LG=\ltjghostbeforejachar
+A\LG  B   \par% ==> ALchar--(xkanjiskip)--\LG
+A\LG  字  \par% ==> ALchar--(xkanjiskip)--\LG
+漢\LG B   \par% ==> JAchar--(kanjiskip)--\LG
+漢\LG 字  \par% ==> JAchar--(kanjiskip)--\LG
+\end{LTXexample}
 
-  なお,本命令は将来的に\LuaTeX-ja本体に組み込む可能性もある.
+  \item[\cs{ltjghostafterjachar}]
+  \cs{ltjghostbeginjachar}と対を成す命令で,実行された箇所は
+  「文字クラス0の\textbf{JAchar}」の直後であると,
+  \LuaTeX-jaの和文処理グルー挿入処理に認識させる.以下の実行例を参照.
+
+\medskip
+\begin{LTXexample}[width=18\zw]
+\ltjsetparameter{kanjiskip=14pt,xkanjiskip=50pt}
+\let\LG=\ltjghostafterjachar
+A\LG  B   \par% ==> \LG--(xkanjiskip)--ALchar
+漢\LG B   \par% ==> \LG--(xkanjiskip)--ALchar
+A\LG  字  \par% ==> \LG--(kanjiskip)--JAchar
+漢\LG 字  \par% ==> \LG--(kanjiskip)--JAchar
+\end{LTXexample}
 \end{cslist}
+なお,バージョン20220207.0で追加された\cs{ltjghostjachar}は実装にバグがあったのと「両側」
+という点が扱いづらかったので,将来は削除する予定である.
 
+両命令の主な仕様用途は和文ゴーストでの使用である.\Pkg{BXghost}パッケージ(\cite{bxghost})などでは
+伝統的に全角空白(\texttt{U+3000})と\verb+\kern-1\zw+を組み合わせた方法が使われてきたが,
+\LuaTeX-jaでは全角空白を使っただけではうまくいかない可能性があるため,新たに命令が用意された.
+
 %</ja>
 
 \subsection{\Pkg{luatexja-ruby}}

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty	2022-02-11 21:54:49 UTC (rev 61981)
@@ -64,7 +64,7 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja-adjust}[2022-02-07]
+  \ProvidesPackage{luatexja-adjust}[2022-02-11]
 \fi                             %</LaTeX>
 
 % Load core module if not yet.
@@ -137,13 +137,18 @@
 \define at key[ltj]{japaram}{profile_hgap_factor}{%
   \directlua{luatexja.adjust.profile_hgap_factor = math.abs(#1)}\relax}
 
-\newluafunction\ltj@@ghost at jachar@inner
-\typeout{\the\ltj@@ghost at jachar@inner.}
+\newluafunction\ltj@@ghost at jachar@inner at both
+\newluafunction\ltj@@ghost at jachar@inner at before
+\newluafunction\ltj@@ghost at jachar@inner at after
 \directlua{
   local t = lua.get_functions_table(); local cgj = luatexja.adjust.create_ghost_jachar_node;
-  t[\the\ltj@@ghost at jachar@inner] = function() cgj(0) end
+  t[\the\ltj@@ghost at jachar@inner at both] = function() cgj(0) end;
+  t[\the\ltj@@ghost at jachar@inner at before] = function() cgj(1) end;
+  t[\the\ltj@@ghost at jachar@inner at after] = function() cgj(2) end
 }%
-\protected\def\ltjghostjachar{\ifhmode\relax\luafunction\ltj@@ghost at jachar@inner\fi}
+\protected\def\ltjghostjachar{\ifhmode\relax\luafunction\ltj@@ghost at jachar@inner at both\fi}% will be removed
+\protected\def\ltjghostbeforejachar{\ifhmode\relax\luafunction\ltj@@ghost at jachar@inner at before\fi}
+\protected\def\ltjghostafterjachar{\ifhmode\relax\luafunction\ltj@@ghost at jachar@inner at after\fi}
 
 
 %%------------------ all done

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua	2022-02-11 21:54:49 UTC (rev 61981)
@@ -565,11 +565,23 @@
     setfield(tn, 'value', cl)
     node_write(tn)
   end
+  local attr_curjfnt = luatexbase.attributes['ltj at curjfnt']
+  local attr_curtfnt = luatexbase.attributes['ltj at curtfnt']
+  local dir_tate = luatexja.dir_table.dir_tate
+  local get_dir_count = ltjd.get_dir_count
+  local ltjf_font_metric_table = ltjf.font_metric_table
+  local function get_current_metric(n)
+     local fn = has_attr(n, (get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt)
+     return fn and ltjf_font_metric_table[fn]
+  end
   local function whatsit_callback(Np, lp, Nq)
     if Np and Np.nuc then return Np
     elseif Np and getfield(lp, 'user_id') == GHOST_JACHAR then
-      Np.first = lp; Np.nuc = lp; Np.last = lp; Np.class = getfield(lp,'value')
-      if Nq then Np.met = Nq.met; Np.pre = 0; Np.post = 0; Np.xspc = 3 end
+      Np.first = lp; Np.nuc = lp; Np.last = lp; Np.class = 0
+      if getfield(lp,'value')<2 then
+        if Nq and Nq.met then Np.met = Nq.met; else Np.met = get_current_metric(lp) end
+        Np.pre = 0; Np.post = 0; Np.xspc = 3
+      else Np.met, Np.pre = nil, nil; end
       Np.auto_kspc, Np.auto_xspc = (has_attr(lp, attr_autospc)==1), (has_attr(lp, attr_autoxspc)==1)
       return Np
     else return Np end
@@ -578,7 +590,10 @@
     if not s and getfield(Nq.nuc, 'user_id') == GHOST_JACHAR then
       local x, y = node_prev(Nq.nuc), Nq.nuc
       Nq.first, Nq.nuc, Nq.last = x, x, x
-      if Np then Nq.met = Np.met end
+      if getfield(y,'value')%2==0 then
+        if Np and Nq.met then Nq.met = Np.met; else Nq.met = get_current_metric(y) end
+        Nq.pre = 0; Nq.post = 0; Nq.xspc = 3
+      else Nq.met, Nq.pre = nil, nil; end
       s = node_remove(head, y); node_free(y)
     end
     return s

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua	2022-02-11 21:54:49 UTC (rev 61981)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.jfmglue',
-  date = '2022-02-03',
+  date = '2022-02-09',
   description = 'Insertion process of JFM glues, [x]kanjiskip and others',
 })
 luatexja.jfmglue = luatexja.jfmglue or {}

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-02-11 21:54:16 UTC (rev 61980)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-02-11 21:54:49 UTC (rev 61981)
@@ -27,7 +27,7 @@
 \newif\ifltj at disablejfam
 
 %%%% VERSION
-\def\LuaTeXjaversion{20220207.0}
+\def\LuaTeXjaversion{20220211.0}
 
 %% Check if LaTeX is used.
 \begingroup\expandafter\expandafter\expandafter\endgroup



More information about the tex-live-commits mailing list.