summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sttools/stabular.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-18 22:33:43 +0000
committerKarl Berry <karl@freefriends.org>2012-10-18 22:33:43 +0000
commit34c48d9566089694027f919d621fec0e075d1b84 (patch)
tree0d9a5e32bd2805eb15ed9a7444b9dfead77d58d9 /Master/texmf-dist/tex/latex/sttools/stabular.sty
parentb2af3a5c5a7adb196a11e1d049a2162b4dd34a45 (diff)
sttools (19oct12)
git-svn-id: svn://tug.org/texlive/trunk@28013 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sttools/stabular.sty')
-rw-r--r--Master/texmf-dist/tex/latex/sttools/stabular.sty174
1 files changed, 101 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/latex/sttools/stabular.sty b/Master/texmf-dist/tex/latex/sttools/stabular.sty
index a408878b419..4342182a174 100644
--- a/Master/texmf-dist/tex/latex/sttools/stabular.sty
+++ b/Master/texmf-dist/tex/latex/sttools/stabular.sty
@@ -1,44 +1,43 @@
-%% stabular.sty
-%% Copyright 1998 Sigitas Tolu\v sis
+%%
+%% This is file `stabular.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% stabular.dtx (with options: `package')
+%%
+%% Copyright (C) 1998-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
-%% e-mail sigitas@vtex.lt
%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
%%
-% This program can redistributed and/or modified under the terms
-% of the LaTeX Project Public License Distributed from CTAN
-% archives in directory macros/latex/base/lppl.txt; either
-% version 1 of the License, or (at your option) any later version.
-%
-% PURPOSE: Improve tabular environment.
-%
-% SHORT DESCRIPTION:
-%
-% Changed internal commands: \@mkpream, \@addamp, \@xhline
-%
-% Provides new commands in tabular (used after command \\):
-% \emptyrow[#1]
-% -------------
-% Adds empty row, #1 - height of the row
-%
-% \tabrow{#1}[#2]
-% ---------------
-% Adds row of natural height: #1\\[#2]
-%
-% Provides new environments: stabular and stabular*
-% -------- ---------
-% One more multi-page version of tabular
-%
+%% PURPOSE: Improve tabular environment.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{stabular}
+ [2012/05/29 v1.1 Improve tabular environment]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{stabular}[1998/03/19]
-%
\def\empty@finalstrut#1{%
- \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\z@}
-\def\no@strut{\global\setbox\@arstrutbox\hbox{%
+ \unskip
+ \ifhmode\nobreak\fi
+ \vrule\@width\z@\@height\z@\@depth\z@
+ }
+\def\no@strut{%
+ \global\setbox\@arstrutbox\hbox{%
\vrule \@height\z@
\@depth\z@
- \@width\z@}%
- \gdef\@endpbox{\empty@finalstrut\@arstrutbox\par\egroup\hfil}%
-}%
+ \@width\z@
+ }%
+ \gdef\@endpbox{\empty@finalstrut\@arstrutbox\par\egroup\hfil}%
+ }%
\def\yes@strut{\global\setbox\@arstrutbox\hbox{%
\vrule \@height\arraystretch \ht\strutbox
\@depth\arraystretch \dp\strutbox
@@ -48,8 +47,10 @@
\def\@mkpream#1{\@firstamptrue\@lastchclass6
\let\@preamble\@empty\def\empty@preamble{\add@ins}%
\let\protect\@unexpandable@protect
- \let\@sharp\relax\let\add@ins\relax
- \let\@startpbox\relax\let\@endpbox\relax
+ \let\@sharp\relax
+ \let\add@ins\relax
+ \let\@startpbox\relax
+ \let\@endpbox\relax
\@expast{#1}%
\expandafter\@tfor \expandafter
\@nextchar \expandafter:\expandafter=\reserved@a\do
@@ -57,7 +58,8 @@
\ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
\or \@classiv \or\@classv \fi\@lastchclass\@chclass}%
\ifcase \@lastchclass \@acol
- \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi}
+ \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi
+ }
\def\@addamp{%
\if@firstamp
\@firstampfalse
@@ -65,52 +67,78 @@
\else
\edef\@preamble{\@preamble &}%
\edef\empty@preamble{\expandafter\noexpand\empty@preamble &\add@ins}%
- \fi}
+ \fi
+ }
\newif\iftw@hlines \tw@hlinesfalse
-\def\@xhline{\ifx\reserved@a\hline
- \tw@hlinestrue
- \else\ifx\reserved@a\Hline
- \tw@hlinestrue
- \else
- \tw@hlinesfalse
- \fi\fi
- \iftw@hlines
- \aftergroup\do@after
- \fi
- \ifnum0=`{\fi}%
-}
+\def\@xhline{%
+ \ifx\reserved@a\hline
+ \tw@hlinestrue
+ \else
+ \ifx\reserved@a\Hline
+ \tw@hlinestrue
+ \else
+ \tw@hlinesfalse
+ \fi
+ \fi
+ \iftw@hlines
+ \aftergroup\do@after
+ \fi
+ \ifnum0=`{\fi}%
+ }
\def\do@after{\emptyrow[\the\doublerulesep]}
-\def\emptyrow{\noalign\bgroup\@ifnextchar[\@emptyrow{\@emptyrow[\z@]}}
-\def\@emptyrow[#1]{\no@strut\gdef\add@ins{\vrule \@height\z@ \@depth#1 \@width\z@}\egroup%
-\empty@preamble\\
-\noalign{\yes@strut\gdef\add@ins{\vrule \@height\z@ \@depth\z@ \@width\z@}}%
-}
-\def\tabrow#1{\noalign\bgroup\@ifnextchar[{\@tabrow{#1}}{\@tabrow{#1}[]}}
-\def\@tabrow#1[#2]{\no@strut\egroup#1\ifx.#2.\\\else\\[#2]\fi\noalign{\yes@strut}}
-%
-\def\endstabular{\crcr\egroup\egroup \egroup}
-\expandafter \let \csname endstabular*\endcsname = \endstabular
+\def\emptyrow{\noalign\bgroup
+ \@ifnextchar[\@emptyrow{\@emptyrow[\z@]}%
+ }
+\def\@emptyrow[#1]{%
+ \no@strut
+ \gdef\add@ins{\vrule \@height\z@ \@depth#1 \@width\z@}%
+ \egroup
+ \empty@preamble\\
+ \noalign{%
+ \yes@strut
+ \gdef\add@ins{\vrule \@height\z@ \@depth\z@ \@width\z@}%
+ }%
+ }
+\def\tabrow#1{\noalign\bgroup
+ \@ifnextchar[{\@tabrow{#1}}{\@tabrow{#1}[]}%
+ }
+\def\@tabrow#1[#2]{\no@strut\egroup
+ #1\ifx.#2.\\\else\\[#2]\fi
+ \noalign{\yes@strut}%
+ }
+\def\endstabular{\crcr\egroup\egroup\egroup}
+\expandafter\let\csname endstabular*\endcsname\endstabular
\def\stabular{\let\@halignto\@empty\@stabular}
\@namedef{stabular*}#1{\def\@halignto{to#1}\@stabular}
-\def\@stabular{\leavevmode \bgroup \let\@acol\@tabacol
- \let\@classz\@tabclassz
- \let\@classiv\@tabclassiv \let\\\@tabularcr\@stabarray}
+\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@}%
+ \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}%
+ \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}
+ \let\tabularnewline\\
+ \let\par\@empty
+ \let\@sharp##%
+ \set@typeset@protect
+ \lineskip\z@skip \baselineskip\z@skip
+ \@preamble
+ }
\endinput
+%%
+%% End of file `stabular.sty'.