OSDN Git Service

Make \adjustbaseline, \userelfont, \bou, \kasen robust
[luatex-ja/luatexja.git] / src / lltjext.sty
index 9c6867f..9e1421b 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2018/09/29 v1.2j-ltj-10 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2019/09/25 v1.2k-ltj-11 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{%
 %%% 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}%