%%
%% This is file `stabular.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% stabular.dtx  (with options: `package')
%% 
%% Copyright (C) 1998-2021 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
%% UAB VTeX, Mokslininkų 2A, LT-08412 Vilnius, Lithuania
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% 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
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% PURPOSE:   Improve tabular environment.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{stabular}
    [2021/10/04 v2.1 Improve tabular environment]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{stabular}[2014/03/20]
\def\use@@pkg@@array@@variant{0}
\DeclareOption{array}{\def\use@@pkg@@array@@variant{1}}
\ProcessOptions*
\def\stabular{\let\@halignto\@empty\@stabular}
\def\endstabular{\crcr\egroup\egroup\egroup}
\@namedef{stabular*}#1{%
  \setlength\dimen@{#1}%
  \edef\@halignto{to\the\dimen@}%
  \@tabular
  }
\expandafter\let\csname endstabular*\endcsname\endstabular
\def\@stabular{\leavevmode
  \bgroup
    \let\@acol\@tabacol
    \let\@classz\@tabclassz
    \let\@classiv\@tabclassiv
    \let\\\@tabularcr
    \@stabarray
  }
\def\@stabarray{\m@th\@ifnextchar[\@sarray{\@sarray[c]}}
\def\@sarray[#1]#2{%
  \bgroup
    \setbox\@arstrutbox\hbox{%
      \vrule \@height\arraystretch\ht\strutbox
             \@depth\arraystretch \dp\strutbox
             \@width\z@
             }%
  \@mkpream{#2}%
  \edef\@preamble{%
    \ialign \noexpand\@halignto
      \bgroup \@arstrut \@preamble \tabskip\z@skip \cr
    }%
  \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
  \let\tabularnewline\\
  %%\let\par\@empty
  \let\@sharp##%
  \set@typeset@protect
  \lineskip\z@skip \baselineskip\z@skip
  \@preamble
  }
\def\pkgarray@@sarray[#1]#2{%
  \@tempdima \ht \strutbox
  \advance \@tempdima by\extrarowheight
  \setbox \@arstrutbox \hbox{\vrule
             \@height \arraystretch \@tempdima
             \@depth \arraystretch \dp \strutbox
             \@width \z@}%
  \begingroup
    \@mkpream{#2}%
    \xdef\@preamble{\noexpand \ialign \@halignto
                    \bgroup \@arstrut \@preamble
                          \tabskip \z@ \cr}%
  \endgroup
  \@arrayleft
  \bgroup
    \let\@sharp##\let\protect\relax
    \lineskip\z@ \baselineskip\z@
    \m@th
    \let\\\@arraycr \let\tabularnewline\\
    %%\let\par\@empty
    \@preamble
  }
\def\pkgarray@@stabarray{\@ifnextchar[{\pkgarray@@sarray}{\pkgarray@@sarray[c]}}
\def\pkgarray@stabular{\def\@halignto{}\pkgarray@@stabular}
\expandafter\def\csname pkgarray@stabular*\endcsname#1{%
       \setlength\dimen@{#1}%
       \edef\@halignto{to\the\dimen@}\pkgarray@@stabular}
\def\pkgarray@@stabular{%
  \leavevmode
  \bgroup
    \col@sep\tabcolsep
    \let\d@llarbegin\begingroup
    \let\d@llarend\endgroup
    \pkgarray@@stabarray
  }
\def\pkgarray@endstabular{\crcr\egroup\egroup\gdef\@preamble{}\egroup}
\expandafter\let\csname pkgarray@endstabular*\endcsname\pkgarray@endstabular
\ifcase\use@@pkg@@array@@variant
\else
  \@ifpackageloaded{array}{}{\RequirePackage{array}}%
  \let\stabular\pkgarray@stabular
  \expandafter\let\csname stabular*\expandafter\endcsname
    \csname pkgarray@stabular*\endcsname
  \let\endstabular\pkgarray@endstabular
  \expandafter\let\csname endstabular*\expandafter\endcsname
    \csname pkgarray@endstabular*\endcsname
\fi
\endinput
%%
%% End of file `stabular.sty'.
