%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2018/09/29 v1.2j-ltj-10 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2020-09-30 v1.2k-ltj-12 Macros for vertical writing]
\RequirePackage{luatexja}
\newcount\ltj@ext@dir
\let\ltj@lltjext@orig@tabular=\tabular
\if Z\caption@posa\def\caption@posa{#4}\fi
\if Z\caption@posb\def\caption@posb{#5}\fi}}
\@onlypreamble\DeclareLayoutCaption
-\DeclareLayoutCaption{figure}<y>(.8\linewidth)[cd]
-\DeclareLayoutCaption{table}<y>(.8\linewidth)[cu]
+\DeclareLayoutCaption{figure}<n>(.8\linewidth)[cd]
+\DeclareLayoutCaption{table}<n>(.8\linewidth)[cu]
\def\layoutcaption{\def\caption@dir{Z}\captionwidth\z@
\def\caption@posa{Z}\def\caption@posb{Z}%
\@ifnextchar<\X@layoutcaption{%
\setbox0\hbox{\hbox{\captiondir
\captionfontsetup\parindent\z@\inhibitglue
\csname fnum@\@captype\endcsname #1}}%"
- \if@tempswa\@tempdima\ltjgetht0\relax\else\@tempdima\ltjgetwd0\relax\fi
+ \if@tempswa\@tempdima\ltjgetht0 \advance\@tempdima\ltjgetdp0
+ \else\@tempdima\ltjgetwd0 \fi
\ifdim\@tempdima>\captionwidth \@tempdima\captionwidth \fi
\@pboxswfalse
\setbox0\hbox{%
\else \let\box@dir\utod
\fi
\fi
+\ifltj@ltfilehook@avail % LaTeX2e >= 2020-10-01
+ \@defaultunitsset\@picht{#3}\unitlength
+ \@defaultunitsset\@picwd{#2}\unitlength
+ \setbox\@picbox\hbox to\@picwd\bgroup\box@dir
+ \@defaultunitsset\@tempdimc{#4}\unitlength\hskip-\@tempdimc
+ \@defaultunitsset\@tempdimc{#5}\unitlength\lower\@tempdimc\hbox\bgroup
+\else % <= 2020-02-02
\@picwd=#2\unitlength \@picht=#3\unitlength
\setbox\@picbox\hbox to\@picwd\bgroup\box@dir
\hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup
+\fi
\ltj@@pic@reset@blshift
\ignorespaces}
\def\endpicture{%
%%% bou
%%%
\def\boutenchar{\char\euc"A1A2}%"
-\def\bou#1{\ifvmode\leavevmode\fi\@bou#1\end}
+\DeclareRobustCommand\bou[1]{\ifvmode\leavevmode\fi\@bou#1\end}
\def\@bou#1{%
\ifx#1\end \let\ltj@@next=\relax
\else
\fi\ltj@@next}
%%% kasen
-\def\kasen#1{%
+\DeclareRobustCommand\kasen[1]{%
\ifnum\ltjgetparameter{direction}=3\relax
\setbox\z@\hbox{#1}\leavevmode\raise.7\zw
\hbox to\z@{\vrule\@width\wd\z@ \@depth\z@ \@height.4\p@\hss}%
\everypar{}}%
}%
}%
- \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<z>}}
+ \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<Z>}}
\def\p@array<##1>[##2]##3{%
\let\box@dir\relax
\if ##1z\relax
\lineskip\z@skip\baselineskip\z@skip\@preamble}
\def\endarray{\crcr\egroup\egroup\@end@alignbox\@arrayright}
}
-
\@ifpackageloaded{array}{%
\let\tabular=\ltj@lltjext@orig@tabular
\let\array=\ltj@lltjext@orig@array
}{%
\let\ltj@lltjext@orig@tabular\relax
\let\ltj@lltjext@orig@array\relax
- \RequirePackage{filehook,etoolbox}
- \AtEndOfPackageFile{array}{\ltj@lltjext@patch@array}
+ \ltj@ExecuteAfterPackage{array}{\ltj@lltjext@patch@array}
}
%%%%%%%%%%%%%%%% LuaTeX-ja original