OSDN Git Service

lltjp-microtype: adapt \MT@is@char to LuaTeX-ja
[luatex-ja/luatexja.git] / src / lltjext.sty
index 49151f5..eb1087a 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2018/09/22 v1.2j-ltj-9 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2018/10/07 v1.2k-ltj-10 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{%
        {\ltj@ext@dir=\ltjgetparameter{direction}\relax}{}{}
   \expandafter\let\csname tabular*\endcsname=\ltj@lltjext@orig@tabularS
   \patchcmd{\p@stabular}{\p@tabular}{\@tabular}{}{}
+  \@ifpackagelater{array}{2018/09/13}
+    {\expandafter\@firstoftwo}
+    {\expandafter\@secondoftwo}
+  {% = for 2018/09/13 v2.4i or newer
   \def\@startpbox##1{\bgroup
-   \box@dir\adjustbaseline%%% これを追加
-   \setlength\hsize{##1}\@arrayparboxrestore
-     \everypar{%
-        \vrule \@height \ltjgetht\@arstrutbox \@width \z@
-        \everypar{}}%
-     }
+    \color@begingroup
+    \box@dir\adjustbaseline%%% これを追加
+    \setlength\hsize{##1}\@arrayparboxrestore
+      \everypar{%
+         \vrule \@height \ltjgetht\@arstrutbox \@width \z@
+         \everypar{}}%
+      }%
+  }{ % = for 2018/04/30 v2.4h or older
+  \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