summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tools/array.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-06 21:33:45 +0000
committerKarl Berry <karl@freefriends.org>2018-04-06 21:33:45 +0000
commit588be4d1b7e254f46ac3c678ef1b3f38833f6491 (patch)
treec73b58d23db18c19737ff12c67e208fd7a89c4c6 /Master/texmf-dist/tex/latex/tools/array.sty
parentc436d9d03043bac0aac83254a8f1a2a45e4aaafd (diff)
latex2e (6apr18)
git-svn-id: svn://tug.org/texlive/trunk@47330 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tools/array.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tools/array.sty63
1 files changed, 49 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/tools/array.sty b/Master/texmf-dist/tex/latex/tools/array.sty
index ab21a6aca04..7cdb801c170 100644
--- a/Master/texmf-dist/tex/latex/tools/array.sty
+++ b/Master/texmf-dist/tex/latex/tools/array.sty
@@ -9,11 +9,11 @@
%% This is a generated file.
%%
%% The source is maintained by the LaTeX Project team and bug
-%% reports for it can be opened at http://latex-project.org/bugs.html
+%% reports for it can be opened at https://latex-project.org/bugs/
%% (but please observe conditions on bug reports sent to that address!)
%%
%%
-%% Copyright 1993-2016
+%% Copyright 1993-2017
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -24,7 +24,7 @@
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
@@ -39,7 +39,7 @@
%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{array}
- [2016/10/06 v2.4d Tabular extension package (FMi)]
+ [2017/11/07 v2.4f Tabular extension package (FMi)]
%%
\def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
@@ -91,6 +91,8 @@
\def\@acol{\@addtopreamble{\hskip\col@sep}}
\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
\let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
+ \let\do@row@strut\relax
+ \let\align@mcell\relax
\@xexpast #1*0x\@@
\count@\m@ne
\let\the@toks\relax
@@ -128,14 +130,30 @@
\hfil
\d@llarbegin
\insert@column
- \d@llarend \hfil \or
- \hskip1sp\d@llarbegin \insert@column \d@llarend \hfil \or
- \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \or
- $\vcenter
- \@startpbox{\@nextchar}\insert@column \@endpbox $\or
- \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
- \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
+ \d@llarend \do@row@strut \hfil \or
+ \hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \hfil \or
+ \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \or
+ \setbox\mcell@box\vbox
+ \@startpbox{\@nextchar}\insert@column \@endpbox
+ \align@mcell
+ \do@row@strut \or
+ \vtop \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut \or
+ \vbox \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut
\fi}\prepnext@tok}
+
+\newbox\mcell@box
+\def\align@mcell{%
+ \ifdim \ht\mcell@box > \ht\@arstrutbox
+ \begingroup
+ \dimen@\ht\mcell@box
+ \advance\dimen@-\ht\@arstrutbox
+ \advance\dimen@\baselineskip
+ \lower.5\dimen@\box\mcell@box
+ \endgroup
+ \else % assume one line and align at baseline
+ \box\mcell@box
+ \fi}
+
\def\@classix{\ifnum \@lastchclass = \thr@@
\@preamerr \thr@@ \fi
\@classx}
@@ -197,9 +215,10 @@
\def\@argarraycr[#1]{\ifnum0=`{}\fi\ifdim #1>\z@
\expandafter\@xargarraycr\else
\expandafter\@yargarraycr\fi{#1}}
-\def\@xargarraycr#1{\unskip
- \@tempdima #1\advance\@tempdima \dp\@arstrutbox
- \vrule \@depth\@tempdima \@width\z@ \cr}
+\def\@xargarraycr#1{\unskip\gdef\do@row@strut
+ {\@tempdima #1\advance\@tempdima \dp\@arstrutbox
+ \vrule \@depth\@tempdima \@width\z@\global\let\do@row@strut\relax}\cr}
+\let\do@row@strut\relax
\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
\long\def\multicolumn#1#2#3{%
\multispan{#1}\begingroup
@@ -288,6 +307,8 @@
{\expandafter\@nextchar\the\toks\count@}}
\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
\let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
+ \let\do@row@strut\relax
+ \let\align@mcell\relax
\@temptokena{#1}\@tempswatrue
\@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
\count@\m@ne
@@ -354,6 +375,20 @@
\vskip\doublerulesep
\fi
\ifnum0=`{\fi}}
+
+\newsavebox\ar@cellbox
+\newcolumntype{w}[2]{%
+ >{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \makebox[#2][#1]{\usebox\ar@cellbox}}}
+
+\newcolumntype{W}[2]
+ {>{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \let\hss\hfil
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
\endinput
%%
%% End of file `array.sty'.