\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-adjust}[2018/07/24]
+ \ProvidesPackage{luatexja-adjust}[2022-02-11]
\fi %</LaTeX>
% Load core module if not yet.
\the\ltjadj@status@lp, \the\ltjadj@status@ls)}\ignorespaces
}
\protected\def\ltjdisableadjust{%
- \ltjenableadjust[lineend=false,priority=false,profile=false,linestep=false]}
+ \ltjenableadjust[lineend=false,priority=false,profile=false,linestep=false]}%
\protected\def\ltjenableadjust{%
\ltx@ifnextchar[{\@@ltjenableadjust}{\@@ltjenableadjust[lineend,priority]}}%]
}
\define@key[ltj]{japaram}{linestep_factor}{%
\directlua{local d = #1; luatexja.adjust.step_factor=math.abs(d)}\relax}
+\define@key[ltj]{japaram}{profile_hgap_factor}{%
+ \directlua{luatexja.adjust.profile_hgap_factor = math.abs(#1)}\relax}
+
+\newluafunction\ltj@@ghost@jachar@inner@both
+\newluafunction\ltj@@ghost@jachar@inner@before
+\newluafunction\ltj@@ghost@jachar@inner@after
+\directlua{
+ local t = lua.get_functions_table(); local cgj = luatexja.adjust.create_ghost_jachar_node;
+ t[\the\ltj@@ghost@jachar@inner@both] = function() cgj(0) end;
+ t[\the\ltj@@ghost@jachar@inner@before] = function() cgj(1) end;
+ t[\the\ltj@@ghost@jachar@inner@after] = function() cgj(2) end
+}%
+\protected\def\ltjghostjachar{\ifhmode\relax\luafunction\ltj@@ghost@jachar@inner@both\fi}% will be removed
+\protected\def\ltjghostbeforejachar{\ifhmode\relax\luafunction\ltj@@ghost@jachar@inner@before\fi}
+\protected\def\ltjghostafterjachar{\ifhmode\relax\luafunction\ltj@@ghost@jachar@inner@after\fi}
%%------------------ all done