%%
%% This is file `array.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% array.dtx  (with options: `package,ncols')
%% 
%% This is a generated file.
%% 
%% The source is maintained by the LaTeX Project team and bug
%% reports for it can be opened at https://latex-project.org/bugs/
%% (but please observe conditions on bug reports sent to that address!)
%% 
%% 
%% Copyright (C) 1993-2024
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%% 
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% 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
%%    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.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%% 
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%% 
%% Package `array' to use with LaTeX 2e
%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
\NeedsTeXFormat{LaTeX2e}[1995/06/01]

\DeclareRelease{}{1994-06-01}{array-2016-10-06.sty}
\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
\DeclareRelease{v2.5}{2023-11-01}{array-2023-11-01.sty}
\DeclareCurrentRelease{}{2024-06-01}

\NeedsTeXFormat{LaTeX2e}[2024/06/01]
\ProvidesPackage{array}
         [2024/10/17 v2.6g Tabular extension package (FMi)]
%%

\ExplSyntaxOn
\def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
\ExplSyntaxOff
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar <8 \else
       \if \@nextchar >9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@ \else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\ExplSyntaxOn
\def\@xexpast#1*#2#3#4\@@{%
   \@tempcnta #2
   \toks@={#1}\@temptokena={#3}%
   \let\the@toksz\relax \let\the@toks\relax
   \def\@tempa{\the@toksz}%
   \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
     {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
       \let \@tempb \@xexpast \else
       \let \@tempb \@xexnoop \fi
   \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
   \edef\@tempa{\@tempa}%
   \expandafter \@tempb \@tempa #4\@@}
\def\prepnext@tok{\advance \count@ \@ne
   \toks\count@{}}
\def\save@decl{\toks\count@ \expandafter{\@nextchar}}
\def\insert@column{%
  \UseTaggingSocket{tbl/cell/begin}%
   \@protected@firstofone { \the@toks \the \@tempcnta \ignorespaces }
   \@sharp \textonly@unskip
   \the@toks \the \count@ \relax
   \UseTaggingSocket{tbl/cell/end}%
}
\protected\def\textonly@unskip{\ifhmode\unskip\fi}
\protected\long\def\@protected@firstofone#1{#1}
\def\insert@pcolumn{%
   \UseTaggingSocket{tbl/pcell/begin}%
   \the@toks \the \@tempcnta \relax
   \ignorespaces \@sharp \unskip
   \the@toks \the \count@ \relax
   \UseTaggingSocket{tbl/pcell/end}%
}
\def\@addamp {
  \if@firstamp
    \@firstampfalse
  \else
    \edef\@preamble{\@preamble &
      \noexpand\tbl_update_cell_data: }
  \fi
}
\newdimen\col@sep
\def\@acol{\@addtopreamble{\hskip\col@sep}}
\def\@classx{%
  \ifcase \@lastchclass
  \@acolampacol \or
  \@addamp \@acol \or
  \@acolampacol \or
  \or
  \@acol \@firstampfalse \or
  \@addamp
  \fi}
\def\@classz{\@classx
   \@tempcnta \count@
   \prepnext@tok
   \@addtopreamble{\ifcase \@chnum
      \hfil
      \hskip1sp%
      \d@llarbegin
      \insert@column
      \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\ar@mcellbox\vbox
    \@startpbox{\@nextchar}\insert@pcolumn \@endpbox
    \ar@align@mcell
    \do@row@strut \or
   \vtop \@startpbox{\@nextchar}\insert@pcolumn \@endpbox\do@row@strut \or
   \vbox \@startpbox{\@nextchar}\insert@pcolumn \@endpbox\do@row@strut
  \fi}\prepnext@tok}

\newbox\ar@mcellbox
\def\ar@align@mcell{%
  \ifdim \ht\ar@mcellbox > \ht\strutbox
    \begingroup
     \dimen@\ht\ar@mcellbox
     \advance\dimen@-\ht\@arstrutbox
     \advance\dimen@\baselineskip
     \lower.5\dimen@\box\ar@mcellbox
    \endgroup
  \else % assume one line and align at baseline
    \box\ar@mcellbox
  \fi}

\def\@arrayrule{\@addtopreamble \vline}
\def\@classvii{\ifnum \@lastchclass = \thr@@
   \@preamerr \thr@@ \fi}
\def\@classvi{\ifcase \@lastchclass
      \@acol \or
      \@addtopreamble{\hskip \doublerulesep}\or
      \@acol \or
      \@classvii
      \fi}
\def\@classii{\advance \count@ \m@ne
   \save@decl\prepnext@tok}
\def\@classi{\@classvi
   \ifcase \@chnum \@arrayrule \or
      \@classv \fi}
\def\@startpbox#1{\bgroup
  \color@begingroup
  \setlength\hsize{#1}\@arrayparboxrestore
   \everypar{%
      \vrule \@height \ht\@arstrutbox \@width \z@
      \everypar{}}%
   }
\def\@endpbox{\@finalstrut\@arstrutbox \par \color@endgroup \egroup\hfil}
\def\@array[#1]#2{
  \@tempdima \ht \strutbox
  \advance \@tempdima by\extrarowheight
  \setbox \@arstrutbox \hbox{\vrule
             \@height \arraystretch \@tempdima
             \@depth \arraystretch \dp \strutbox
             \@width \z@}%
  \tbl_save_outer_table_cols:
  \begingroup
  \@mkpream{#2}%
  \tbl_count_table_cols:
  \xdef\@preamble{
    \noexpand \ar@ialign
    \@halignto
       \bgroup \@arstrut
      \UseTaggingSocket{tbl/row/begin}
      \tbl_init_cell_data_for_row:
      \@preamble
      \tabskip \z@ \cr}
  \endgroup
  \@arrayleft
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  \bgroup
  \let \@sharp ##\let \protect \relax
  \lineskip \z@
  \baselineskip \z@
  \mathsurround \z@
  \let\\\@arraycr \let\tabularnewline\\\let\par\@empty
  \UseTaggingSocket{tbl/init}
  \@preamble
}
\def\ar@ialign{%
  \tbl_init_cell_data_for_table:
  \everycr{%
    \noalign{%
      \tbl_if_row_was_started:T  { \UseTaggingSocket{tbl/row/end} }
      \tbl_update_cell_data_for_next_row:
    }%
  }%
  \tabskip\z@skip\halign}
\def\arraybackslash{\let\\\tabularnewline}
\newdimen \extrarowheight
\extrarowheight=0pt
\def\@arstrut{\unhcopy\@arstrutbox}
\protected\def\@arraycr {
  \tbl_count_missing_cells:n {@arraycr}
  \iffalse{\fi\ifnum 0=`}\fi
  \@ifstar \@xarraycr \@xarraycr}

\def\@xarraycr{\@ifnextchar [%
  \@argarraycr {\ifnum 0=`{}\fi\cr}}
\def\@argarraycr[#1]{\ifnum0=`{}\fi\ifdim #1>\z@
  \expandafter\@xargarraycr\else
  \expandafter\@yargarraycr\fi{#1}}
\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}%
   \ifnum\@multicnt >\z@ \do@row@strut \fi
   \cr}
\let\do@row@strut\relax
\long\def\multicolumn#1#2#3{%
   \multispan{#1}\begingroup
   \tbl_update_multicolumn_cell_data:n {#1}
   \def\@addamp{\if@firstamp \@firstampfalse \else
                \@preamerr 5\fi}%
   \@mkpream{#2}\@addtopreamble\@empty
   \endgroup
   \UseTaggingSocket{tbl/colspan}{#1}%
   \def\@sharp{#3}%
   \@arstrut \@preamble
   \null
   \ignorespaces}
\let\d@llarbegin\begingroup
\let\d@llarend\endgroup
\def\array{\col@sep\arraycolsep
  \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}%
  \@tabarray}
\def\tabular{\def\@halignto{}\@tabular}
\expandafter\def\csname tabular*\endcsname#1{%
       \setlength\dimen@{#1}%
       \edef\@halignto{to\the\dimen@}\@tabular}
\def\@tabular{%
  \leavevmode
  \UseTaggingSocket{tbl/hmode/begin}%
  \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
                                    \let\d@llarend\endgroup
  \@tabarray}
\def\endarray {
  \tbl_crcr:n{endarray} \egroup
  \UseTaggingSocket{tbl/finalize}
  \tbl_restore_outer_cell_data:
  \egroup
  \@arrayright \gdef\@preamble{}%
}
\def\endtabular{\endarray\m@th $\egroup
  \UseTaggingSocket{tbl/hmode/end}%
}
\expandafter\let\csname endtabular*\endcsname=\endtabular
\let\@ampacol=\relax        \let\@expast=\relax
\let\@arrayclassiv=\relax   \let\@arrayclassz=\relax
\let\@tabclassiv=\relax     \let\@tabclassz=\relax
\let\@arrayacol=\relax      \let\@tabacol=\relax
\let\@tabularcr=\relax      \let\@@endpbox=\relax
\let\@argtabularcr=\relax   \let\@xtabularcr=\relax
\ExplSyntaxOff
\def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
   \PackageError{array}{%
   \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
    Missing arg: token ignored\or                           %1
    Empty preamble: `l' used\or                             %2
    >\@tempd token ignored\or                               %3
    <\@tempd changed to !{..}\or                            %4
    Only one column-spec. allowed.\fi}\@ehc}                %5
\def\newcolumntype#1{%
  \edef\NC@char{\string#1}%
  \@ifundefined{NC@find@\NC@char}%
    {\@tfor\next:=<>clrmbp@!|\do
      {%
        \if\expandafter\noexpand\next\NC@char
        \PackageWarning{array}%
                       {Redefining primitive column \NC@char}\fi}%
     \NC@list\expandafter{\the\NC@list\NC@do#1}}%
    {\PackageWarning{array}{Column \NC@char\space is already defined}}%
  \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}%
  \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}}
\ExplSyntaxOn
\def\newcol@#1[#2]#3{\expandafter\@reargdef
     \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}}
\def\NC@#1{%
  \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend}
\def\NC@ifend{%
  \ifx\next\relax
    \else\@tempswatrue\expandafter\NC@rewrite\fi}
\def\NC@do#1{%
  \expandafter\let\expandafter\NC@rewrite
    \csname NC@rewrite@\string#1\endcsname
  \expandafter\let\expandafter\NC@find
    \csname NC@find@\string#1\endcsname
  \expandafter\@temptokena\expandafter{\expandafter}%
        \expandafter\NC@find\the\@temptokena#1\relax}
\def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}}
\def\NC@show#1{%
  \typeout{Column~ #1\expandafter\expandafter\expandafter\NC@strip
  \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}}
\ExplSyntaxOff
\def\NC@strip#1:#2->#3 #4\@@{#2 -> #4}
\ExplSyntaxOn
\newtoks\NC@list
\newcolumntype{*}[2]{}
\long\@namedef{NC@rewrite@*}#1#2{%
  \count@#1\relax
  \loop
  \ifnum\count@>\z@
  \advance\count@\m@ne
  \@temptokena\expandafter{\the\@temptokena#2}%
  \repeat
  \NC@find}
\let\@xexpast\relax
\let\@xexnoop\relax
\def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter
                  {\expandafter\@nextchar\the\toks\count@}}
\ExplSyntaxOff % really oldstyle using \@tfor :=
\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
   \let\@sharp\relax
   \def\@startpbox##1{\unexpanded\expandafter{\expandafter
                      \@startpbox\expandafter{##1}}}\let\@endpbox\relax
   \let\do@row@strut\relax
   \let\ar@align@mcell\relax
   \@temptokena{#1}\@tempswatrue
   \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
   \count@\m@ne
   \let\the@toks\relax
   \prepnext@tok
   \expandafter \@tfor \expandafter \@nextchar
    \expandafter :\expandafter =\the\@temptokena \do
   {\@testpach
   \ifcase \@chclass \@classz \or \@classi \or \@classii
     \or \save@decl \or \or \@classv \or \@classvi
     \or \@classvii \or \@classviii
     \or \@classx
     \or \@classx \fi
   \@lastchclass\@chclass}%
   \ifcase\@lastchclass
   \@acol \or
   \or
   \@acol \or
   \@preamerr \thr@@ \or
   \@preamerr \tw@ \@addtopreamble\@sharp \or
   \or
   \else  \@preamerr \@ne \fi
   \def\the@toks{\the\toks}}
\ExplSyntaxOn
\let\@classix\relax
\def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else
      \@preamerr 4\@chclass 6 \@classvi \fi\fi}
\def\@classv{\save@decl
   \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@__tbl
   \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
   \prepnext@tok}
\def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@__tbl{\def\@tempa{#2}%
  \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi}
\def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
\let\@@array\@array
\let\@arrayleft\@empty
\let\@arrayright\@empty
\newlength{\extratabsurround}
\setlength{\extratabsurround}{2pt}
\newlength{\backup@length}
\newcommand{\firsthline}{%
  \multicolumn1{@{}c@{}}{%
    \global\backup@length\ht\@arstrutbox
    \global\advance\backup@length\dp\@arstrutbox
    \global\advance\backup@length\arrayrulewidth
     \raise\extratabsurround\copy\@arstrutbox
     \kern-1sp%
    }\\[-\backup@length]\hline
}
\newcommand{\lasthline}{\hline\multicolumn1{@{}c@{}}{%
    \global\backup@length2\ht\@arstrutbox
    \global\advance\backup@length2\dp\@arstrutbox
    \global\advance\backup@length\arrayrulewidth
    }\\[-\backup@length]%
    \multicolumn1{@{}c@{}}{%
       \lower\extratabsurround\copy\@arstrutbox
       \kern-1sp%
       }%
}
\CheckCommand*\@xhline{\ifx\reserved@a\hline
               \vskip\doublerulesep
               \vskip-\arrayrulewidth
             \fi
      \ifnum0=`{\fi}}
\renewcommand*\@xhline{\ifx\reserved@a\hline
               \vskip\doublerulesep
             \fi
      \ifnum0=`{\fi}}

\newsavebox\ar@cellbox
\newcolumntype{w}[2]{%
  >{\begin{lrbox}\ar@cellbox\d@llarbegin}%
  c%
  <{\d@llarend \end{lrbox}%
    \makebox[#2][#1]{\unhbox\ar@cellbox}}}

\newcolumntype{W}[2]
  {>{\begin{lrbox}\ar@cellbox\d@llarbegin}%
   c%
   <{\d@llarend\end{lrbox}%
   \let\hss\hfil
   \makebox[#2][#1]{\unhbox\ar@cellbox}}}
\ExplSyntaxOn
\def\@cline#1-#2\@nil{
  \omit
  \@multicnt#1
  \advance\@multispan\m@ne
  \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
  \@multicnt#2
  \advance\@multicnt-#1
  \advance\@multispan\@ne
  \UseTaggingSocket{tbl/leaders/begin}
  \leaders\hrule\@height\arrayrulewidth\hfill
  \UseTaggingSocket{tbl/leaders/end}
  \tbl_gdecr_row_count:
  \cr
  \noalign{\vskip-\arrayrulewidth}
}
\ExplSyntaxOff
\ExplSyntaxOff
\endinput
%%
%% End of file `array.sty'.
