blob: 8c97bbf53a440fc1b67cabc7b381f1d163dfdc82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
%%
%% 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'.
|