diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-20 22:52:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-20 22:52:08 +0000 |
commit | f25003156178593b10b6d6173ca4ec99160faff4 (patch) | |
tree | 000888005422ab8c8a0690f72551dd2675dcf0e2 /Master/texmf-dist/source/latex/sttools | |
parent | b1675bc8f4c698e26c644cf3f0c67765a66d27c1 (diff) |
sttools (20mar14)
git-svn-id: svn://tug.org/texlive/trunk@33238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/sttools')
-rw-r--r-- | Master/texmf-dist/source/latex/sttools/flushend.dtx | 15 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/sttools/stabular.dtx | 261 |
2 files changed, 88 insertions, 188 deletions
diff --git a/Master/texmf-dist/source/latex/sttools/flushend.dtx b/Master/texmf-dist/source/latex/sttools/flushend.dtx index 85bd869d005..e2ca6861b07 100644 --- a/Master/texmf-dist/source/latex/sttools/flushend.dtx +++ b/Master/texmf-dist/source/latex/sttools/flushend.dtx @@ -42,12 +42,12 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{flushend} %<*package> - [2014/03/03 v2.0 Balancing columns in twocolumn mode] + [2014/03/18 v2.1 Balancing columns in twocolumn mode] %</package> % %<*driver> \documentclass{ltxdoc} -\usepackage{flushend}[2014/02/29] +\usepackage{flushend}[2014/03/18] \EnableCrossrefs \CodelineIndex %%\RecordChanges @@ -59,7 +59,7 @@ %</driver> % \fi % -% \CheckSum{1305} +% \CheckSum{1306} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -83,6 +83,7 @@ % \changes{v1.0}{1997/10/01}{\string\vipersep changed to \string\stripsep for compatibility with cuted.sty} % \changes{v1.1}{2012/05/29}{Converted to DTX file} % \changes{v2.0}{2014/03/03}{rewritten with new balance algorithm} +% \changes{v2.1}{2014/03/18}{Switched debug option off} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -174,20 +175,18 @@ %<*package> % \fi % -% \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{flushend}[2014/03/03 v2.0 Balancing columns in twocolumn mode] -% \end{macrocode} % % \begin{macrocode} \newif\if@auto@baselineskip \@auto@baselineskiptrue -\newif\if@balance@debug \@balance@debugtrue +\newif\if@balance@debug \@balance@debugfalse \DeclareOption{autobase}{\global\@auto@baselineskiptrue} \DeclareOption{noauto}{\global\@auto@baselineskipfalse} \DeclareOption{debug}{\global\@balance@debugtrue} +\DeclareOption{nodebug}{\global\@balance@debugfalse} \ProcessOptions % \end{macrocode} % +% % \begin{macrocode} \newskip\flushend@@lastskip@a \newskip\flushend@@lastskip@b diff --git a/Master/texmf-dist/source/latex/sttools/stabular.dtx b/Master/texmf-dist/source/latex/sttools/stabular.dtx index 9d37f0b3291..f8044720b1c 100644 --- a/Master/texmf-dist/source/latex/sttools/stabular.dtx +++ b/Master/texmf-dist/source/latex/sttools/stabular.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt> +% Copyright (C) 2014 by Sigitas Tolu\v{s}is <sigitas@vtex.lt> % --------------------------------------------------------------------------- % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -24,7 +24,7 @@ \ProvidesFile{stabular.dtx} %</driver> %<*package> -%% Copyright (C) 1998-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt> +%% Copyright (C) 1998-2014 by Sigitas Tolu\v{s}is <sigitas@vtex.lt> %% VTeX Ltd., Akademijos 4, Vilnius, Lithuania %% http://www.vtex.lt/tex/download/macros/ %% -------------------------------------------------------------------------- @@ -42,12 +42,12 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{stabular} %<*package> - [2014/01/13 v1.2 Improve tabular environment] + [2014/03/20 v2.0 Improve tabular environment] %</package> % %<*driver> \documentclass{ltxdoc} -\usepackage{stabular}[2014/01/13] +\usepackage{stabular}[2014/03/20] \EnableCrossrefs \CodelineIndex \RecordChanges @@ -59,7 +59,7 @@ %</driver> % \fi % -% \CheckSum{322} +% \CheckSum{239} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -80,6 +80,7 @@ % % \changes{v1.1}{2012/05/29}{Converted to DTX file} % \changes{v1.2}{2014/01/13}{Fixed bug in the '@sarray' macro} +% \changes{v2.0}{2014/03/20}{Minimized code and extra functionality} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -93,35 +94,28 @@ % % \section{Introduction} % -% \textbf{Purpose}: improve tabular environment by providing -% new commands for adds between tabular rows and allowing page break. +% \textbf{Purpose}: improve tabular environment by allowing page break. % % \section{Usage} % -% Provides new commands in tabular (used after command |\\|). +% Just insert |\noalign{\eject}| after command |\\| to do a page break inside +% |stabular| environment. % -% \DescribeMacro{\emptyrow[\meta{row height}]} -% -% \medskip -% Adds empty row with specified \meta{row height}. -% -% \medskip -% \DescribeMacro{\tabrow\marg{tokens}[\meta{adds}]} -% -% Adds row of natural height: \meta{tokens}|\\|[\meta{adds}]. -% -% \medskip % \DescribeMacro{stabular} % \DescribeMacro{stabular*} % Provides new environments: |stabular| and |stabular*|. % It is one more multi-page version of tabular. % +% \subsection{Package options} +% +% \DescribeMacro{array} +% \indent It is used to support tabular environment defined in array +% package. +% % \StopEventually{} % % \section{Implementation} % -% Changed internal commands: |\@mkpream|, |\@addamp|, |\@xhline|. -% % \iffalse %<*package> % \fi @@ -129,179 +123,34 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{stabular}[1998/03/19] -% \end{macrocode} -% -% \begin{macro}{\empty@finalstrut} -% -% \begin{macrocode} -\def\empty@finalstrut#1{% - \unskip - \ifhmode\nobreak\fi - \vrule\@width\z@\@height\z@\@depth\z@ - } -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\no@strut} -% \begin{macrocode} -\def\no@strut{% - \global\setbox\@arstrutbox\hbox{% - \vrule \@height\z@ - \@depth\z@ - \@width\z@ - }% - \gdef\@endpbox{\empty@finalstrut\@arstrutbox\par\egroup\hfil}% - }% -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\yes@strut} -% \begin{macrocode} -\def\yes@strut{\global\setbox\@arstrutbox\hbox{% - \vrule \@height\arraystretch \ht\strutbox - \@depth\arraystretch \dp\strutbox - \@width\z@}% - \gdef\@endpbox{\@finalstrut\@arstrutbox\par\egroup\hfil}% -}% -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\@mkpream} -% \begin{macrocode} -\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 - \@expast{#1}% - \expandafter\@tfor \expandafter - \@nextchar \expandafter:\expandafter=\reserved@a\do - {\@testpach\@nextchar - \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 - } -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\@addamp} -% \begin{macrocode} -\def\@addamp{% - \if@firstamp - \@firstampfalse - \edef\empty@preamble{\add@ins}% - \else - \edef\@preamble{\@preamble &}% - \edef\empty@preamble{\expandafter\noexpand\empty@preamble &\add@ins}% - \fi - } -\newif\iftw@hlines \tw@hlinesfalse -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\@xhline} -% \begin{macrocode} -\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}% - } -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\do@after} -% \begin{macrocode} -\def\do@after{\emptyrow[\the\doublerulesep]} +\ProvidesPackage{stabular}[2014/03/20] % \end{macrocode} -% \end{macro} % % -% \begin{macro}{\emptyrow} % \begin{macrocode} -\def\emptyrow{\noalign\bgroup - \@ifnextchar[\@emptyrow{\@emptyrow[\z@]}% - } +\def\use@@pkg@@array@@variant{0} +\DeclareOption{array}{\def\use@@pkg@@array@@variant{1}} +\ProcessOptions* % \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\@emptyrow} -% \begin{macrocode} -\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@}% - }% - } -% \end{macrocode} -% \end{macro} +% % -% -% \begin{macro}{\tabrow} +% \begin{macro}{stabular} % \begin{macrocode} -\def\tabrow#1{\noalign\bgroup - \@ifnextchar[{\@tabrow{#1}}{\@tabrow{#1}[]}% - } +\def\stabular{\let\@halignto\@empty\@stabular} +\def\endstabular{\crcr\egroup\egroup\egroup} % \end{macrocode} % \end{macro} % % -% \begin{macro}{\@tabrow} +% \begin{macro}{stabular*} % \begin{macrocode} -\def\@tabrow#1[#2]{\no@strut\egroup - #1\ifx.#2.\\\else\\[#2]\fi - \noalign{\yes@strut}% +\@namedef{stabular*}#1{% + \setlength\dimen@{#1}% + \edef\@halignto{to\the\dimen@}% + \@tabular } -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\endstabular} -% -% \begin{macrocode} -\def\endstabular{\crcr\egroup\egroup\egroup} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} \expandafter\let\csname endstabular*\endcsname\endstabular % \end{macrocode} -% -% \begin{macro}{\stabular} -% \begin{macrocode} -\def\stabular{\let\@halignto\@empty\@stabular} -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\stabular} -% \begin{macrocode} -\@namedef{stabular*}#1{\def\@halignto{to#1}\@stabular} -% \end{macrocode} % \end{macro} % % @@ -351,8 +200,60 @@ % \end{macrocode} % \end{macro} % +% Definitions to provide |array| package support. +% +% \begin{macrocode} +\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{\gdef\@halignto{}\pkgarray@@stabular} +\expandafter\def\csname pkgarray@stabular*\endcsname#1{% + \setlength\dimen@{#1}% + \xdef\@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 +% \end{macrocode} +% +% % \begin{macrocode} -%\endinput +\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 % \end{macrocode} % % \iffalse |