+
+%% Compatibility with array package
+
+\def\ltj@lltjext@patch@array{%
+ \patchcmd{\@tabular}{\hbox\bgroup}{%
+ \hbox\bgroup\ltj@ext@dir=\ltjgetparameter{direction}}{}{}
+ \pretocmd{\array}%
+ {\ltj@ext@dir=\ltjgetparameter{direction}\relax}{}{}
+ \def\@startpbox##1{\bgroup
+ \box@dir\adjustbaseline%%% これを追加
+ \setlength\hsize{##1}\@arrayparboxrestore
+ \everypar{%
+ \vrule \@height \ltjgetht\@arstrutbox \@width \z@
+ \everypar{}}%
+ }
+ \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<z>}}
+ \def\p@array<##1>[##2]##3{%
+ \let\box@dir\relax
+ \if ##1z\relax
+ \ifnum\ltj@ext@dir=3\relax
+ \let\box@dir\utod\@tempcnta=\zstrutbox
+ \fi
+ \else
+ \if ##1y\relax
+ \let\box@dir\yoko\@tempcnta=\ystrutbox
+ \else\if ##1t\relax
+ \let\box@dir\tate\@tempcnta=\tstrutbox
+ \else\if ##1d\relax
+ \let\box@dir\dtou\@tempcnta=\dstrutbox
+ \else\if ##1u\relax
+ \let\box@dir\utod\@tempcnta=\zstrutbox
+ \fi\fi\fi\fi
+ \fi
+ \ifx\box@dir\relax
+ \ifcase\ltj@ext@dir
+ \or \let\box@dir\dtou\@tempcnta=\dstrutbox% dtou
+ \or\or\let\box@dir\tate\@tempcnta=\tstrutbox% tate
+ \or \let\box@dir\yoko\@tempcnta=\ystrutbox% yoko
+ \else \let\box@dir\utod\@tempcnta=\zstrutbox% utod
+ \fi
+ \fi
+ \setbox \@arstrutbox \hbox{\box@dir\vrule
+ \@height \arraystretch
+ \dimexpr \ltjgetht\@tempcnta+\extrarowheight\relax
+ \@depth \arraystretch \ltjgetdp \@tempcnta
+ \@width \z@}%
+ \fork@array@option<##1>[##2]%
+ \begingroup
+ \@mkpream{##3}%
+ \xdef\@preamble{\ialign \noexpand \@halignto
+ \bgroup \tabskip \z@skip \@arstrut \@preamble
+ \tabskip \z@ \cr}%
+ \endgroup
+ \@arrayleft
+ \@begin@alignbox\bgroup\box@dir\adjustbaseline
+ \let\par\@empty
+ \let\@sharp####\let\protect\relax
+ \let\\\@arraycr\let\tabularnewline\\\let\par\@empty
+ \lineskip\z@skip\baselineskip\z@skip\@preamble}
+ \def\endarray{\crcr\egroup\egroup\@end@alignbox\@arrayright}
+}
+
+\@ifpackageloaded{array}{%
+ \expandafter\let\csname tabular*\endcsname=\ltj@lltjext@orig@tabularS
+ \let\tabular=\ltj@lltjext@orig@tabular
+ \let\array=\ltj@lltjext@orig@array
+ \ltj@lltjext@patch@array
+}{%
+ \let\ltj@lltjext@orig@tabularS\relax
+ \let\ltj@lltjext@orig@tabular\relax
+ \let\ltj@lltjext@orig@array\relax
+ \RequirePackage{filehook,etoolbox}
+ \AtEndOfPackageFile{array}{\ltj@lltjext@patch@array}
+}
+
+%%%%%%%%%%%%%%%% LuaTeX-ja original
+
+%%\define@key[ltj]{japaram}{autouprightnum}{% %COUNT
+%% \ltj@@set@stack{AURN}{0}{10000}\z@#1 }
+