diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctable')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctable/ctable.sty | 203 |
1 files changed, 132 insertions, 71 deletions
diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty index 5345fbc01ac..b915b5fd4c1 100644 --- a/Master/texmf-dist/tex/latex/ctable/ctable.sty +++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2005 by Wybo Dekker <wybo@servalys.nl> +%% Copyright (C) 2005 by Wybo Dekker <wybo@dekkerdocumenten.nl> %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license @@ -22,58 +22,116 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{ctable} - [2010/10/30 v1.17 ctable package] + [2011/04/15 v1.18 ctable package] \RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating} \def\NN{\tabularnewline} \def\FL{\toprule} \def\ML{\NN\midrule} \def\LL{\NN\bottomrule} -\definecolor{@ctblframefg}{rgb}{0,0,0}% -\definecolor{@ctblframebg}{rgb}{1,1,1}% -\def\@ctblfgcolor#1 #2 #3={\definecolor{@ctblframefg}{rgb}{#1,#2,#3}} -\def\@ctblbgcolor#1 #2 #3={\definecolor{@ctblframebg}{rgb}{#1,#2,#3}} +\def\@defaultctblfgcolor#1 #2 #3={\definecolor{@defaultctblframefg}{rgb}{#1,#2,#3}} +\def\@defaultctblbgcolor#1 #2 #3={\definecolor{@defaultctblframebg}{rgb}{#1,#2,#3}} +\def\@ctblfgcolor#1 #2 #3={% + \definecolor{@ctblframefg}{rgb}{#1,#2,#3} + \def\@ctblfgactual{@ctblframefg}} +\def\@ctblbgcolor#1 #2 #3={% + \definecolor{@ctblframebg}{rgb}{#1,#2,#3} + \def\@ctblbgactual{@ctblframebg}} \def\@ctbltextsuperscript#1{% - \ifx\@ctblnosuper\empty\@textsuperscript{#1}\else{\footnotesize#1}\fi + \ifx\@ctblsuper\@ctbltrue\@textsuperscript{#1}\else{\footnotesize#1}\fi } +\def\@ctbltrue{1} +\def\@ctblfalse{0} \def\@ctbldoinside{\relax} -\newdimen\@ctblframesep -\newdimen\@ctblframerule -\newdimen\@ctblwidth -\newdimen\@ctblcaptionskip -\newdimen\@ctblmaxwidth -\newdimen\@ctblmincapwidth +\newdimen\@ctblframesep \newdimen\@defaultctblframesep +\newdimen\@ctblframerule \newdimen\@defaultctblframerule +\newdimen\@ctblwidth \newdimen\@defaultctblwidth +\newdimen\@ctblcaptionskip \newdimen\@defaultctblcaptionskip +\newdimen\@ctblmaxwidth \newdimen\@defaultctblmaxwidth +\newdimen\@ctblmincapwidth \newdimen\@defaultctblmincapwidth \newdimen\@ctblw % the final width \newdimen\@ctblfloatwidth \newdimen\@ctbloldsep \newdimen\@ctbloldrule \newbox\ctbl@t % tabular saved and measured here + +\define@key{suctbl}{botcap}[]{\let\@defaultctblbotcap\@ctbltrue} +\define@key{suctbl}{captionskip}{\@defaultctblcaptionskip=#1} +\define@key{suctbl}{center}[]{\let\@defaultctblalign\centering} +\define@key{suctbl}{continued}{\def\@defaulttextcontinued{#1}} +\define@key{suctbl}{doinside}{\def\@defaultctbldoinside{#1}} +\define@key{suctbl}{figure}[]{\def\@defaultctbltaborfig{figure}} +\define@key{suctbl}{framebg}{\@defaultctblbgcolor#1=} +\define@key{suctbl}{framefg}{\@defaultctblfgcolor#1=} +\define@key{suctbl}{framerule}{\@defaultctblframerule=#1} +\define@key{suctbl}{framesep}{\@defaultctblframesep=#1} +\define@key{suctbl}{left}[]{\let\@defaultctblalign\raggedright} +\define@key{suctbl}{maxwidth}{\@defaultctblmaxwidth=#1} +\define@key{suctbl}{mincapwidth}{\@defaultctblmincapwidth=#1} +\define@key{suctbl}{nonotespar}[]{\let\@defaultctblnotespar\@ctblfalse} +\define@key{suctbl}{nosideways}[]{\let\@defaultctblsideways\empty} +\define@key{suctbl}{nostar}[]{\def\@defaultctblstarred{}} +\define@key{suctbl}{nosuper}[]{\let\@defaultctblsuper\@ctblfalse} +\define@key{suctbl}{notespar}[]{\let\@defaultctblnotespar\@ctbltrue} +\define@key{suctbl}{pos}{\def\@defaultctblpos{#1}} +\define@key{suctbl}{right}[]{\let\@defaultctblalign\raggedleft} +\define@key{suctbl}{sideways}[]{\def\@defaultctblsideways{sideways}} +\define@key{suctbl}{star}[]{\def\@defaultctblstarred{*}} +\define@key{suctbl}{super}[]{\let\@defaultctblsuper\@ctbltrue} +\define@key{suctbl}{table}[]{\def\@defaultctbltaborfig{table}} +\define@key{suctbl}{topcap}[]{\let\@defaultctblbotcap\@ctblfalse} +\define@key{suctbl}{width}{\@defaultctblwidth=#1} + +\newcommand{\setupctable}[1]{\setkeys{suctbl}{#1}} +\setupctable{ + table, + continued=(continued), + topcap, + pos=, + framerule=0pt, + captionskip=0pt, + framesep=0pt, + width=0pt, + maxwidth=0pt, + mincapwidth=0pt, + nosideways, + center, + nostar, + super, + nonotespar, + doinside={}, + framebg=1 1 1, + framefg=0 0 0, +} + +\define@key{ctbl}{botcap}[]{\let\@ctblbotcap\@ctbltrue} +\define@key{ctbl}{captionskip}{\@ctblcaptionskip=#1} \define@key{ctbl}{caption}{\def\@ctblcaption{#1}} \define@key{ctbl}{cap}{\def\@ctblcap{#1}} +\define@key{ctbl}{center}[]{\let\@ctblalign\centering} +\define@key{ctbl}{continued}[\@defaulttextcontinued]{\def\@ctblcontinued{#1}} +\define@key{ctbl}{doinside}{\def\@ctbldoinside{#1}} +\define@key{ctbl}{figure}[]{\def\@ctbltaborfig{figure}} +\define@key{ctbl}{framebg}{\@ctblbgcolor#1=} +\define@key{ctbl}{framefg}{\@ctblfgcolor#1=} +\define@key{ctbl}{framerule}{\@ctblframerule=#1} +\define@key{ctbl}{framesep}{\@ctblframesep=#1} \define@key{ctbl}{label}{\def\@ctbllabel{#1}} -\define@key{ctbl}{continued}[(continued)]{\def\@ctblcontinued{#1}} -\define@key{ctbl}{pos}{\def\@ctblpos{#1}\def\@ctblbegin{\@ctblbeg[#1]}} -\define@key{ctbl}{width}{\@ctblwidth=#1} +\define@key{ctbl}{left}[]{\let\@ctblalign\raggedright} \define@key{ctbl}{maxwidth}{\@ctblmaxwidth=#1} \define@key{ctbl}{mincapwidth}{\@ctblmincapwidth=#1} -\define@key{ctbl}{botcap}[]{\def\@ctblbotcap{1}} -\define@key{ctbl}{sideways}[]{\def\@ctblsideways{sideways}} -\define@key{ctbl}{rotate}[]{\def\@ctblsideways{sideways} - \PackageWarning{ctable}{ - using obsolete option 'rotate', use 'sideways' instead} - } -\define@key{ctbl}{figure}[]{\def\@ctbltaborfig{figure}} -\define@key{ctbl}{center}[]{\let\@ctblalign\centering} +\define@key{ctbl}{nonotespar}[]{\let\@ctblnotespar\@ctblfalse} +\define@key{ctbl}{nosideways}[]{\let\@ctblsideways\empty} +\define@key{ctbl}{nostar}[]{\def\@ctblstarred{}} +\define@key{ctbl}{nosuper}[]{\let\@ctblsuper\@ctblfalse} +\define@key{ctbl}{notespar}[]{\let\@ctblnotespar\@ctbltrue} +\define@key{ctbl}{pos}{\def\@ctblpos{#1}\def\@ctblbegin{\@ctblbeg[#1]}} \define@key{ctbl}{right}[]{\let\@ctblalign\raggedleft} -\define@key{ctbl}{left}[]{\let\@ctblalign\raggedright} -\define@key{ctbl}{star}[]{\def\@ctblstarred {*}} -\define@key{ctbl}{framerule}{\@ctblframerule=#1} -\define@key{ctbl}{framesep}{\@ctblframesep=#1} -\define@key{ctbl}{framefg}{\@ctblfgcolor#1=} -\define@key{ctbl}{framebg}{\@ctblbgcolor#1=} -\define@key{ctbl}{captionskip}{\@ctblcaptionskip=#1} -\define@key{ctbl}{nosuper}[]{\def\@ctblnosuper{1}} -\define@key{ctbl}{notespar}[]{\def\@ctblnotespar{1}} -\define@key{ctbl}{doinside}{\def\@ctbldoinside{#1}} +\define@key{ctbl}{sideways}[]{\def\@ctblsideways{sideways}} +\define@key{ctbl}{star}[]{\def\@ctblstarred{*}} +\define@key{ctbl}{super}[]{\let\@ctblsuper\@ctbltrue} +\define@key{ctbl}{table}[]{\def\@ctbltaborfig{table}} +\define@key{ctbl}{topcap}[]{\let\@ctblbotcap\@ctblfalse} +\define@key{ctbl}{width}{\@ctblwidth=#1} \def\@ctblCaption{ \ifx\@ctblcap\undefined\let\@ctblcap\@ctblcaption\fi \ifx\@ctblcaption\empty\else @@ -97,38 +155,40 @@ \fcolorbox{#1}{#2}{\fboxsep\@ctbloldsep\fboxrule\@ctbloldrule #3}% } \newcommand{\tnote}[2][a]{% - \ifx\@ctblnotespar\empty% - \hbox{\@ctbltextsuperscript{\normalfont\textit{#1}}}\NN - \else% + \ifx\@ctblnotespar\@ctbltrue% \@ctbltextsuperscript{\normalfont\textit{#1}}\,#2 + \else% + \hbox{\@ctbltextsuperscript{\normalfont\textit{#1}}}\NN \fi } \newcommand{\tmark}[1][a]{% \hbox{\textsuperscript{\normalfont\textit{#1}}}} \newcommand{\ctable}[4][]{% - \def\@ctbltaborfig{table}% - \let\@ctblalign\centering% - \def\@ctblsideways{}% - \def\@ctblcontinued{}% - \def\@ctblpos {}% - \def\@ctblcaption {}% - \let\@ctblcap\undefined% - \def\@ctbllabel {}% - \def\@ctblbeg {\begin{\@ctblsideways\@ctbltaborfig\@ctblstarred}}% - \def\@ctblbegin {\@ctblbeg}% - \def\@ctblend {\end{\@ctblsideways\@ctbltaborfig\@ctblstarred}}% - \def\@ctblbotcap {}% - \def\@ctblstarred {}% - \def\@ctblnosuper {}% - \def\@ctblnotespar{}% - \def\@ctbldoinside{}% - \@ctblframerule0pt - \@ctblcaptionskip=0ex - \@ctblframesep0pt - \@ctblwidth=0pt - \@ctblmaxwidth=0pt - \@ctblmincapwidth=0pt - \setkeys{ctbl}{#1}% + \let\@ctbltaborfig \@defaultctbltaborfig + \let\@ctblalign \@defaultctblalign + \let\@ctblsideways \@defaultctblsideways + \let\@ctblcontinued \empty + \let\@ctblpos \@defaultctblpos + \let\@ctblcaption \empty + \let\@ctblcap \undefined + \let\@ctbllabel \empty + \let\@ctblbotcap \@defaultctblbotcap + \let\@ctblstarred \@defaultctblstarred + \let\@ctblsuper \@defaultctblsuper + \let\@ctblnotespar \@defaultctblnotespar + \let\@ctbldoinside \@defaultctbldoinside + \@ctblframerule \@defaultctblframerule + \@ctblcaptionskip \@defaultctblcaptionskip + \@ctblframesep \@defaultctblframesep + \@ctblwidth \@defaultctblwidth + \@ctblmaxwidth \@defaultctblmaxwidth + \@ctblmincapwidth \@defaultctblmincapwidth + \def\@ctblfgactual {@defaultctblframefg} + \def\@ctblbgactual {@defaultctblframebg} + \def\@ctblbeg {\begin{\@ctblsideways\@ctbltaborfig\@ctblstarred}} + \def\@ctblbegin {\@ctblbeg} + \def\@ctblend {\end{\@ctblsideways\@ctbltaborfig\@ctblstarred}} + \setkeys{ctbl}{#1} \ifdim\@ctblwidth=0pt\else \ifdim\@ctblmaxwidth=0pt\else \PackageError{ctable}{ @@ -136,7 +196,7 @@ Use either width or maxwidth} \fi \fi - \ifx\@ctblpos\empty\else + \ifx\@ctblpos\empty \ifx\@ctblsideways\empty\else \PackageError{ctable}{ You may not use the pos and sideways options together}{ @@ -152,7 +212,7 @@ \fi \sbox\ctbl@t{% \@ctblXcolumntype{l}% temporarily make type X = l - \@ctblframe{@ctblframefg}{@ctblframebg}{% + \@ctblframe{\@ctblfgactual}{\@ctblbgactual}{% \@ctbldoinside \begin{tabular}{#2} #4% @@ -173,7 +233,7 @@ \if@ctblusex \sbox\ctbl@t{% \@ctblXcolumntype{Y}% restore X - \@ctblframe{@ctblframefg}{@ctblframebg}{% + \@ctblframe{\@ctblfgactual}{\@ctblbgactual}{% \@ctbldoinside \begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2} #4% @@ -191,25 +251,26 @@ \ifx\@ctblcontinued\empty\else\addtocounter{\@ctbltaborfig}{-1}\fi \@ctblalign \begin{minipage}{\@ctblfloatwidth}\parindent0pt - \ifx\@ctblbotcap\empty\@ctblCaption\vskip\@ctblcaptionskip\fi + \ifx\@ctblbotcap\@ctblfalse\@ctblCaption\vskip\@ctblcaptionskip\fi \centering{\usebox\ctbl@t} % insert the tabular \def\@ctblfootnotes{#3}% \ifx#3\empty\else{% append footnotes, if any \footnotesize - \ifx\@ctblnotespar\empty% - \\ - \begin{tabularx}{\hsize}{r@{\,}>{\raggedright}X} - #3% - \end{tabularx}% - \else% + \ifx\@ctblnotespar\@ctbltrue% \\[.2ex] \begin{minipage}{\hsize}% #3% \end{minipage}% + \else% + \\ + \begin{tabularx}{\hsize}{r@{\,}>{\raggedright}X} + #3% + \end{tabularx}% \fi + } \fi - \ifx\@ctblbotcap\empty\else\vskip\@ctblcaptionskip\@ctblCaption\fi + \ifx\@ctblbotcap\@ctbltrue\vskip\@ctblcaptionskip\@ctblCaption\fi \end{minipage} \@ctblend } |