summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty10
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua38
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua5
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua12
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty13
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty6
10 files changed, 77 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
index d325df7dc6c..5d37eb6258d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
@@ -64,7 +64,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-adjust}[2022-01-03]
+ \ProvidesPackage{luatexja-adjust}[2022-02-07]
\fi %</LaTeX>
% Load core module if not yet.
@@ -137,6 +137,14 @@
\define@key[ltj]{japaram}{profile_hgap_factor}{%
\directlua{luatexja.adjust.profile_hgap_factor = math.abs(#1)}\relax}
+\newluafunction\ltj@@ghost@jachar@inner
+\typeout{\the\ltj@@ghost@jachar@inner.}
+\directlua{
+ local t = lua.get_functions_table(); local cgj = luatexja.adjust.create_ghost_jachar_node;
+ t[\the\ltj@@ghost@jachar@inner] = function() cgj(0) end
+}%
+\protected\def\ltjghostjachar{\ifhmode\relax\luafunction\ltj@@ghost@jachar@inner\fi}
+
%%------------------ all done
\ltj@adjust@AtEnd
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
index 76a1a68ec48..87c85dd07a4 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
@@ -551,4 +551,40 @@ do
end
end
-
+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 GHOST_JACHAR = luatexbase.newuserwhatsitid('ghost of a jachar', 'luatexja')
+ luatexja.userid_table.GHOST_JACHAR = GHOST_JACHAR
+ function ltja.create_ghost_jachar_node(cl)
+ local tn = node_new(id_whatsit, sid_user)
+ setfield(tn, 'user_id', GHOST_JACHAR)
+ setfield(tn, 'type', 100)
+ setfield(tn, 'value', cl)
+ node_write(tn)
+ 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.auto_kspc, Np.auto_xspc = (has_attr(lp, attr_autospc)==1), (has_attr(lp, attr_autoxspc)==1)
+ return Np
+ else return Np end
+ end
+ local function whatsit_after_callback(s, Nq, Np, head)
+ 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
+ s = node_remove(head, y); node_free(y)
+ end
+ return s
+ end
+ luatexbase.add_to_callback("luatexja.jfmglue.whatsit_getinfo", whatsit_callback,
+ "ghost of a JACHAR", 1)
+ luatexbase.add_to_callback("luatexja.jfmglue.whatsit_after", whatsit_after_callback,
+ "ghost of a JACHAR", 1)
+end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
index d7cdbd9364d..db320509d18 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
@@ -924,6 +924,11 @@ end
-- adjust
do
local id_adjust = node.id 'adjust'
+ local scan_keyword = token.scan_keyword
+ function luatexja.direction.adjust_begin()
+ if scan_keyword 'pre' then tex.sprint(cat_lp, '\\ltj@@vadjust@pre')
+ else tex.sprint(cat_lp, '\\ltj@@vadjust@post') end
+ end
function luatexja.direction.check_adjust_direction()
start_time_measure 'box_primitive_hook'
local list_dir = get_adjust_dir_count()
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index a2bede6442e..7ada76335b5 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2022-01-02',
+ date = '2022-02-03',
description = 'Insertion process of JFM glues, [x]kanjiskip and others',
})
luatexja.jfmglue = luatexja.jfmglue or {}
@@ -1104,7 +1104,9 @@ do
luatexbase.call_callback("luatexja.jfmglue.special_jaglue_after", Nq.nuc)
end,
[id_pbox_w]= function()
- luatexbase.call_callback("luatexja.jfmglue.whatsit_after", false, Nq, Np)
+ local hh = luatexbase.call_callback("luatexja.jfmglue.whatsit_after", false, Nq, Np, head)
+ -- hh: new head of false (nott processed)
+ if hh then head = hh end
end,
}
@@ -1323,7 +1325,7 @@ do
end
end
- local function whatsit_after_callback(s, Nq, Np)
+ local function whatsit_after_callback(s, Nq, Np, head)
if not s and getfield(Nq.nuc, 'user_id') == BPAR then
local x, y = node_prev(Nq.nuc), Nq.nuc
Nq.first, Nq.nuc, Nq.last = x, x, x
@@ -1334,7 +1336,7 @@ do
Nq.met = Np.met; Nq.pre = 0; Nq.post = 0; Nq.xspc = 0
Nq.auto_xspc, Nq.auto_kspc = 0, 0
end
- head = node_remove(head, y)
+ s = node_remove(head, y)
node_free(y)
elseif not s and getfield(Nq.nuc, 'user_id') == BOXB then
local x, y = node_prev(Nq.nuc), Nq.nuc
@@ -1346,7 +1348,7 @@ do
Nq.met = Np.met; Nq.pre = 0; Nq.post = 0; Nq.xspc = 0
Nq.auto_xspc, Nq.auto_kspc = 0, 0
end
- head = node_remove(head, y)
+ s = node_remove(head, y)
node_free(y)
end
return s
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index c6f976767ff..5268cc1dcd5 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
@@ -88,14 +88,14 @@
\ltjdefcharrange{4}{%
"500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
"2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A95F, "A980-"ABFF, "E000-"F8FF,
- "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFFF, "1B170-"1F0FF,
+ "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFEF, "1B170-"1F0FF,
"1F300-"1FFFF, "2000-"206F
} % non-Japanese
\ltjdefcharrange{5}{"D800-"DFFF, "E0000-"E00FF, "E01F0-"10FFFF}
\ltjdefcharrange{6}{%
"2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
"4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF,
- "1B000-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
+ "1AFF0-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
}
\ltjdefcharrange{7}{%
"1100-"11FF, "2F00-"2FFF, "3100-"318F, "31A0-"31EF, "A000-"A4CF,
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
index d5bc3939637..320b7307f05 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.ruby',
- date = '2021-05-04',
+ date = '2022-02-03',
description = 'Ruby annotation',
})
luatexja.ruby = {}
@@ -764,7 +764,7 @@ do
end
local RIPOST = luatexja.stack_table_index.RIPOST
local abs = math.abs
- local function whatsit_after_callback(s, Nq, Np)
+ local function whatsit_after_callback(s, Nq, Np, head)
if not s and getfield(Nq.nuc, 'user_id') == RUBY_PRE then
if Np then
local last_glue = node_new(id_glue)
@@ -802,7 +802,7 @@ do
rst.post = 0
end
end
- return true
+ return head
else
return s
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index fb58eaf31d8..cc49fbd4798 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-05-21 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2022-01-12 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -623,19 +623,22 @@
%%%% vadjust
\let\ltj@@orig@vadjust\vadjust
+\newluafunction\ltj@@vadjust@begin@inner
\newluafunction\ltj@@vadjust@dirhook@inner
\newluafunction\ltj@@vadjust@check@dir@inner
\directlua{
local t = lua.get_functions_table()
+ t[\the\ltj@@vadjust@begin@inner] = luatexja.direction.adjust_begin
t[\the\ltj@@vadjust@dirhook@inner]
= function () luatexja.direction.set_list_direction_hook('adj') end
- t[\the\ltj@@vadjust@check@dir@inner]
- = luatexja.direction.check_adjust_direction
+ t[\the\ltj@@vadjust@check@dir@inner] = luatexja.direction.check_adjust_direction
}
+\protected\luadef\ltj@@vadjust\ltj@@vadjust@begin@inner
\luadef\ltj@@vadjust@dirhook\ltj@@vadjust@dirhook@inner
\protected\luadef\ltj@@vadjust@check@dir\ltj@@vadjust@check@dir@inner
-\protected\def\ltj@@vadjust{%
- \ltj@@orig@vadjust\bgroup\ltj@@vadjust@dirhook
+\def\ltj@@vadjust@pre{\ltj@@orig@vadjust pre\bgroup\ltj@@vadjust@dirhook
+ \aftergroup\ltj@@vadjust@check@dir\let\ltj@@next}
+\def\ltj@@vadjust@post{\ltj@@orig@vadjust\bgroup\ltj@@vadjust@dirhook
\aftergroup\ltj@@vadjust@check@dir\let\ltj@@next}
\let\vadjust\ltj@@vadjust %% PRIMITIVE
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index 48db2624ecd..ae389af99b9 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -27,7 +27,7 @@
\newif\ifltj@disablejfam
%%%% VERSION
-\def\LuaTeXjaversion{20220103.0}
+\def\LuaTeXjaversion{20220207.0}
%% Check if LaTeX is used.
\begingroup\expandafter\expandafter\expandafter\endgroup
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index 19b365ad48f..086771a200b 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}[2021-03-25 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2022-01-17 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
%%% expl3
@@ -208,7 +208,7 @@
\else\hbox{\yoko \@textsuperscript{\normalfont\@thefnmark}}\fi}
\begingroup
\@ifpackageloaded{hyperref}
- {\def\ltj@setrefprefix{real}}
+ {\ifdefined\real@setref\def\ltj@setrefprefix{real}\else\def\ltj@setrefprefix{}\fi}
{\def\ltj@setrefprefix{}}
\expandafter\gdef\csname \ltj@setrefprefix @setref\endcsname#1#2#3{%
\ifx#1\relax
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
index b76a3957a00..c330c0ea572 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjdefs}[2021-04-29 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2022-01-23 Default font settings of LuaTeX-ja]
\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi
\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{file:HaranoAjiGothic-Medium.otf}\fi
@@ -151,14 +151,14 @@
\ltjdefcharrange{4}{%
"500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
"2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A95F, "A980-"ABFF, "E000-"F8FF,
- "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFFF, "1B170-"1F0FF,
+ "FB00-"FE0F, "FE20-"FE2F, "FE70-"FEFF, "10000-"1AFEF, "1B170-"1F0FF,
"1F300-"1FFFF, "2000-"206F
} % non-Japanese
\ltjdefcharrange{5}{"D800-"DFFF, "E0000-"E00FF, "E01F0-"10FFFF}
\ltjdefcharrange{6}{%
"2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF,
"4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF,
- "1B000-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
+ "1AFF0-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF
}
\ltjdefcharrange{7}{%
"1100-"11FF, "2F00-"2FFF, "3100-"318F, "31A0-"31EF, "A000-"A4CF,