summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/xtab/xtab.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/xtab/xtab.dtx')
-rw-r--r--Master/texmf-dist/source/latex/xtab/xtab.dtx111
1 files changed, 47 insertions, 64 deletions
diff --git a/Master/texmf-dist/source/latex/xtab/xtab.dtx b/Master/texmf-dist/source/latex/xtab/xtab.dtx
index 0d8b9ea6e9c..420bd6f8bd9 100644
--- a/Master/texmf-dist/source/latex/xtab/xtab.dtx
+++ b/Master/texmf-dist/source/latex/xtab/xtab.dtx
@@ -1,11 +1,8 @@
% \iffalse meta-comment
%
-
-%
% xtab.dtx
-% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004
-% (or at: pandgwilson at earthlink dot net)
-% Copyright 1998 -- 2004 Peter R. Wilson
+% Author: Peter Wilson (herries dot press (at) earthlink dor net)
+% Copyright 1998 -- 2008 Peter R. Wilson
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -35,7 +32,7 @@
%</driver>
%
% \fi
-% \CheckSum{1508}
+% \CheckSum{1521}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -81,8 +78,9 @@
% \def\dtxfile{xtab.dtx}
% \def\fileversion{v2.3}
% \def\filedate{2000/04/09}
-% \def\fileversion{v2.3a}
-% \def\filedate{2004/05/24}
+% \def\fileversion{v2.3a} \def\filedate{2004/05/24}
+% \def\fileversion{v2.3b} \def\filedate{2007/03/24}
+% \def\fileversion{v2.3c} \def\filedate{2008/07/26}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -95,9 +93,8 @@
% \filedate.}}
%
% \author{%
-% Peter Wilson\thanks{After May 2004 at: \texttt{pandgwilson at earthlink dot net}}\\
-% Catholic University of America \\
-% Now at \texttt{peter.r.wilson@boeing.com}
+% Peter Wilson \\
+% \texttt{herries dot press (at) earthlink dot net}
% }
% \date{\filedate}
% \maketitle
@@ -521,10 +518,12 @@
% \changes{v2.2a}{2000/02/15}{Deleted supertab... }
% \changes{v2.2a}{2000/02/15}{Updated to latest ISO class}
% \changes{v2.3}{2000/04/09}{Improved pagebreak control via \cs{xentrystretch} }
+% \changes{v2.3b}{2007/03/24}{Allow calc package calculations}
+% \changes{v2.3c}{2008/07/26}{Tried to eliminate all extraneous spaces}
% \begin{macrocode}
%<*xtab>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{xtab}[2000/04/09 v2.3 Extended supertabular package]
+\ProvidesPackage{xtab}[2008/07/26 v2.3c Extended supertabular package]
% \end{macrocode}
%
@@ -653,7 +652,7 @@
% \changes{v2.2a}{2000/02/15}{Added \cs{@initisotab} command}
% \begin{macrocode}
\@ifundefined{@initisotab}{%
- \newcommand{\@initisotab}{}
+ \newcommand{\@initisotab}{}%
\newif\ifinfloat}{\typeout{xtab using iso captions}}
% \end{macrocode}
@@ -677,7 +676,7 @@
\@initisotab
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
- \csname the#1\endcsname}{\ignorespaces #2}}
+ \csname the#1\endcsname}{\ignorespaces #2}}%
\begingroup
\@parboxrestore
\normalsize
@@ -692,8 +691,7 @@
% \cs{ST@caption} }
% \begin{macrocode}
\global\advance\ST@pageleft -\PWSTcapht
- \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}
-}
+ \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}
% \end{macrocode}
% \end{macro}
@@ -863,11 +861,8 @@
% \begin{macrocode}
\newcommand\ST@trace[2]{%
\ifnum\c@tracingst>#1\relax
- \GenericWarning
- {(xtab)\@spaces\@spaces}
- {Package xtab: #2}%
- \fi
-}
+ \GenericWarning{(xtab)\@spaces\@spaces}{Package xtab: #2}%
+ \fi}
% \end{macrocode}
% \end{macro}
@@ -1006,7 +1001,7 @@
\def\ST@argtabularcr[#1]{%
\ifnum0=`{\fi}%
\ifdim #1>\z@
- \unskip\ST@xargarraycr{#1}
+ \unskip\ST@xargarraycr{#1}%
\else
\ST@yargarraycr{#1}%
\fi}
@@ -1040,12 +1035,15 @@
% The macros that deal with parbox columns need to be redefined,
% because we need to know the size of the parbox.
% \changes{v2}{1997/11/30}{ST@startpbox changed to 4.1b version}
+% \changes{v2.3b}{2007/03/24}{Added \cs{setlength} to \cs{ST@startpbox} and
+% \cs{ST@astartpbox} (courtesy of Heiko Oberdiek)}
% \begin{macrocode}
\def\ST@startpbox#1{%
% \end{macrocode}
% To achieve our goal we need to save the text in box.
% \begin{macrocode}
- \setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
+%%%% \setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
+ \setbox\ST@pbox\vtop\bgroup\setlength\hsize{#1}\@arrayparboxrestore}
% \end{macrocode}
% \end{macro}
%
@@ -1054,7 +1052,8 @@
% \begin{macrocode}
\def\ST@astartpbox#1{%
\bgroup\hsize#1%
- \setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
+%%%% \setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
+ \setbox\ST@pbox\vtop\bgroup\setlength\hsize{#1}\@arrayparboxrestore}
% \end{macrocode}
% \end{macro}
%
@@ -1100,8 +1099,7 @@
\ST@trace\tw@{Basic line height: \the\ST@lineht\MessageBreak%
Arrayed line height: \the\ST@stretchht}%
\global\advance\ST@lineht \PWST@xentrystretch\ST@lineht
- \ST@trace\tw@{Stretched line height: \the\ST@lineht}%
-}
+ \ST@trace\tw@{Stretched line height: \the\ST@lineht}}
% \end{macrocode}
% \end{macro}
@@ -1209,8 +1207,8 @@
\else
\setbox\@tempboxa=\vbox{\@arrayparboxrestore
\ST@restore
- \expandafter\tabular\expandafter{\ST@tableformat}
- \@tabletail\endtabular}
+ \expandafter\tabular\expandafter{\ST@tableformat}%
+ \@tabletail\endtabular}%
\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxa
\fi
% \end{macrocode}
@@ -1238,7 +1236,7 @@
% caption. Allowance is also made for skips around the caption.
% \begin{macrocode}
\if@topcaption
- \setbox\@tempboxa=\vbox{\PWST@thecaption}
+ \setbox\@tempboxa=\vbox{\PWST@thecaption}%
\PWSTcapht=\ht\@tempboxa\advance\PWSTcapht\dp\@tempboxa
\advance\PWSTcapht by 20\p@
\else
@@ -1264,8 +1262,7 @@
% \end{macrocode}
% Finish up with the original code.
% \begin{macrocode}
- \fi
-} % end \@calfirstpageheight
+ \fi} % end \@calfirstpageheight
% \end{macrocode}
% \end{macro}
@@ -1278,8 +1275,7 @@
\ST@trace\tw@{Calculating height of xtabular on next page}%
\global\ST@pageleft\@colroom
\global\ST@pagesofar=\z@
- \ST@trace\tw@{Maximum space for xtabular: \the\ST@pageleft}%
- }
+ \ST@trace\tw@{Maximum space for xtabular: \the\ST@pageleft}}
% \end{macrocode}
% \end{macro}
@@ -1333,8 +1329,7 @@
\expandafter\tabular\expandafter{\ST@tableformat}%
\@tablehead\endtabular}%
\PWST@ht = \ht\@tempboxa\advance\PWST@ht\dp\@tempboxa
- \global\advance\PWST@generalht by \PWST@ht
-} % end \PWSTcalchtlines
+ \global\advance\PWST@generalht by \PWST@ht}
% \end{macrocode}
% \end{macro}
@@ -1375,8 +1370,7 @@
\global\ST@pageleft\@colroom
\global\advance\ST@pageleft -\PWST@ht
\global\ST@pagesofar=\z@
- \ST@trace\tw@{Available space for xtabular: \the\ST@pageleft}%
-}
+ \ST@trace\tw@{Available space for xtabular: \the\ST@pageleft}}
% \end{macrocode}
% \end{macro}
@@ -1498,8 +1492,7 @@
\global\advance\ST@pageleft -\ST@headht%
\ST@trace\tw@{Available space after accounting for header: \the\ST@pageleft}%
\global\advance\ST@pageleft -\ST@tailht%
- \ST@trace\tw@{Available space after accounting for tail: \the\ST@pageleft}%
-}
+ \ST@trace\tw@{Available space after accounting for tail: \the\ST@pageleft}}
% \end{macrocode}
% \end{macro}
@@ -1525,7 +1518,7 @@
% \begin{macrocode}
\ifx\PWSTtempc\relax
\ST@trace\tw@{Table \the\c@PWSTtable: Processing for the first time}%
- \PWSTlastpage=\@m % = 1000
+ \PWSTlastpage=\@m% = 1000
\else
\PWSTlastpage=\PWSTtempc
\fi
@@ -1548,8 +1541,7 @@
% in a `float'.
% \changes{v2}{1997/12/02}{Added setting of \cs{ifinfloat}}
% \begin{macrocode}
- \infloattrue
-}
+ \infloattrue}
% \end{macrocode}
% \end{macro}
@@ -1573,7 +1565,7 @@
% We can now save the preamble of the tabular in a macro.
% \begin{macrocode}
\def\@supertabular[#1]#2{%
- \def\ST@tableformat{#2}
+ \def\ST@tableformat{#2}%
\ST@trace\tw@{Starting a new xtabular}%
% \end{macrocode}
% Then remember that this is not a \textsf{supertabular*}
@@ -1747,8 +1739,7 @@
% \end{macrocode}
% And back to the original code.
% \begin{macrocode}
- \ST@trace\tw@{Ended a xtabular\ifST@star*\fi}%
- }
+ \ST@trace\tw@{Ended a xtabular\ifST@star*\fi}}
% \end{macrocode}
%
% The definition of the ending of the \Lenv{xtabular*}
@@ -1793,8 +1784,7 @@
% \changes{v2}{1997/12/02}{Added resetting of \cs{ifinfloat}}
% \begin{macrocode}
\PWSToplastpagenum
- \infloatfalse
-}
+ \infloatfalse}
% \end{macrocode}
% \end{macro}
@@ -1858,11 +1848,10 @@
% Finally, write out the `new' last page number.
% \begin{macrocode}
\if@filesw\immediate\write\@auxout%
- {\gdef\string\PWST@\romannumeral\c@PWSTtable{\the\PWSTcurpage}}
+ {\gdef\string\PWST@\romannumeral\c@PWSTtable{\the\PWSTcurpage}}%
\ST@trace\tw@{Table \the\c@PWSTtable:\MessageBreak
wrote \the\PWSTcurpage\space as the last page}%
- \fi
-}
+ \fi}
% \end{macrocode}
% \end{macro}
@@ -1888,8 +1877,7 @@
% \end{macrocode}
% Finish per the original code.
% \begin{macrocode}
- \ST@trace\tw@{Ended an mpxtabular\ifST@star*\fi}%
- }
+ \ST@trace\tw@{Ended an mpxtabular\ifST@star*\fi}}
% \end{macrocode}
%
% The definition of the ending of the \Lenv{mpxtabular*}
@@ -1912,8 +1900,7 @@
\let\@arraycr\org@tabularcr
\fi
\let\@startpbox\org@startpbox
- \let\@endpbox\org@endpbox
-}
+ \let\@endpbox\org@endpbox}
% \end{macrocode}
% \end{macro}
@@ -1982,7 +1969,7 @@
% \begin{macrocode}
\global\advance\PWSTlines \@ne
\ST@trace\thr@@{Line counter incremented by one to: \the\PWSTlines}%
- } % end of noalign
+ }% end of noalign
% \end{macrocode}
% In general, when the |\ST@pageleft| has become negative,
% the last row was so high
@@ -2018,7 +2005,7 @@
\global\advance\@tempdima\ht\@mpfootins
\global\advance\@tempdima 3pt
\fi
- \fi} % end noalign
+ \fi}% end noalign
\ifnum\ST@pageleft<\@tempdima
\ST@newpage
\else
@@ -2081,8 +2068,7 @@
% Finish like |\ST@cr|.
% \begin{macrocode}
\global\let\ST@next\@empty
- } % end noalign
-}
+ }}
% \end{macrocode}
% \end{macro}
@@ -2099,8 +2085,7 @@
\global\firstcallfalse
\global\PWSTlines=\z@
\ST@trace\thr@@{Overflow on last page. Line counter set to \the\PWSTlines}%
- \fi
-}
+ \fi}
% \end{macrocode}
% \end{macro}
@@ -2138,8 +2123,7 @@
% each supertabular by changing the definition of |\ST@skippage|.
% \begin{macrocode}
\global\let\ST@skippage\ST@newpage
- }
-}
+ }}
% \end{macrocode}
% \end{macro}
@@ -2253,8 +2237,7 @@
% \begin{macrocode}
\let\ST@next\@tablehead
\ST@trace\tw@{Set heading to tablehead}%
- \fi
-}
+ \fi}
% \end{macrocode}
% \end{macro}