-\def\ltj@@getparam@one#1{%
- \directlua{luatexja.ext_get_parameter_unary('#1')}%
-}%
+\newluafunction\ltj@@getparam@one@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@getparam@one@inner] = luatexja.ext_get_parameter_unary
+}
+\luadef\ltj@@getparam@one\ltj@@getparam@one@inner
\def\ltj@@getparam@two#1#2{%
\directlua{luatexja.ext_get_parameter_binary('#1', \ltj@safe@num@or{nil}{#2})}%
}
\def\ltj@@getparam@two#1#2{%
\directlua{luatexja.ext_get_parameter_binary('#1', \ltj@safe@num@or{nil}{#2})}%
}
\protected\def\ltj@allalchar{\relax
\csname ltj@kcat0\endcsname="7FFFFFFF %"
\csname ltj@kcat1\endcsname="7FFFFFFF %"
\protected\def\ltj@allalchar{\relax
\csname ltj@kcat0\endcsname="7FFFFFFF %"
\csname ltj@kcat1\endcsname="7FFFFFFF %"
+\newluafunction\ltj@@lua@populate@insertwhatsit@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@lua@populate@insertwhatsit@inner]
+ = luatexja.direction.populate_insertion_dir_whatsit
+}
+\luadef\ltj@@lua@populate@insertwhatsit\ltj@@lua@populate@insertwhatsit@inner
\protected\def\insert{\begingroup\afterassignment\ltj@@insert@A\ltj@tempcnta}
\protected\def\ltj@@insert@A{\orig@insert\ltj@tempcnta\bgroup
\aftergroup\ltj@@insert@B\let\ltj@@next}
\protected\def\insert{\begingroup\afterassignment\ltj@@insert@A\ltj@tempcnta}
\protected\def\ltj@@insert@A{\orig@insert\ltj@tempcnta\bgroup
\aftergroup\ltj@@insert@B\let\ltj@@next}
\newluafunction\ltj@@box@dirhook
\directlua{
local t, ltjd = lua.get_functions_table(), luatexja.direction
\newluafunction\ltj@@box@dirhook
\directlua{
local t, ltjd = lua.get_functions_table(), luatexja.direction
= function() ltjd.set_list_direction_hook() end
}
\PushPreHook{hbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
= function() ltjd.set_list_direction_hook() end
}
\PushPreHook{hbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
\AtBeginShipout{\directlua{luatexja.direction.finalize()}}
%%%% \raise, \lower, \moveleft, \moveright
\AtBeginShipout{\directlua{luatexja.direction.finalize()}}
%%%% \raise, \lower, \moveleft, \moveright
\let\ltj@@orig@raise=\raise
\let\ltj@@orig@lower=\lower
\protected\def\raise{\ltj@reset@globaldefs\afterassignment\ltj@@raise\ltj@tempdima}
\let\ltj@@orig@raise=\raise
\let\ltj@@orig@lower=\lower
\protected\def\raise{\ltj@reset@globaldefs\afterassignment\ltj@@raise\ltj@tempdima}
}\ltj@afterbox\ltj@@raise@a}
\let\ltj@@orig@moveleft=\moveleft
\let\ltj@@orig@moveright=\moveright
}\ltj@afterbox\ltj@@raise@a}
\let\ltj@@orig@moveleft=\moveleft
\let\ltj@@orig@moveright=\moveright
\let\ltj@@orig@vcenter=\vcenter
\protected\def\vcenter{\ltj@afterbox\ltj@@vcenter\vbox}
\protected\def\ltj@@vcenter{%
\let\ltj@@orig@vcenter=\vcenter
\protected\def\vcenter{\ltj@afterbox\ltj@@vcenter\vbox}
\protected\def\ltj@@vcenter{%
+\newluafunction\ltj@@lua@unboxcheckdir@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@lua@unboxcheckdir@inner]=luatexja.direction.unbox_check_dir
+}
+\luadef\ltj@@lua@unboxcheckdir\ltj@@lua@unboxcheckdir@inner
\long\def \@gobbletwo #1#2{}
\let\ltj@@orig@unhbox=\unhbox
\let\ltj@@orig@unvbox=\unvbox
\protected\def\unhbox{\ltj@reset@globaldefs\afterassignment\ltj@@unhbox\ltj@tempcnta}
\protected\def\unvbox{\ltj@reset@globaldefs\afterassignment\ltj@@unvbox\ltj@tempcnta}
\protected\def\ltj@@unhbox{%
\long\def \@gobbletwo #1#2{}
\let\ltj@@orig@unhbox=\unhbox
\let\ltj@@orig@unvbox=\unvbox
\protected\def\unhbox{\ltj@reset@globaldefs\afterassignment\ltj@@unhbox\ltj@tempcnta}
\protected\def\unvbox{\ltj@reset@globaldefs\afterassignment\ltj@@unvbox\ltj@tempcnta}
\protected\def\ltj@@unhbox{%
\let\ltj@@orig@unhcopy=\unhcopy
\let\ltj@@orig@unvcopy=\unvcopy
\protected\def\unhcopy{\ltj@reset@globaldefs\afterassignment\ltj@@unhcopy\ltj@tempcnta}
\let\ltj@@orig@unhcopy=\unhcopy
\let\ltj@@orig@unvcopy=\unvcopy
\protected\def\unhcopy{\ltj@reset@globaldefs\afterassignment\ltj@@unhcopy\ltj@tempcnta}