From 3fa25ef405a8e7ed3c953a496e786cb46d2e4fbe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Oct 2006 19:46:38 +0000 Subject: ctable 1.8 (13oct06) git-svn-id: svn://tug.org/texlive/trunk@2326 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/ctable/ctable.sty | 53 ++++++++++++++++----------- 1 file changed, 32 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty index 20be2e8eeae..02ed078f5ac 100644 --- a/Master/texmf-dist/tex/latex/ctable/ctable.sty +++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty @@ -6,25 +6,25 @@ %% %% ctable.dtx (with options: `package') %% -%% IMPORTANT NOTICE: +%% This is a generated file. %% -%% For the copyright see the source file. +%% Copyright (C) 2005 by Wybo Dekker %% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from ctable.sty. +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: %% -%% For distribution of the original source see the terms -%% for copying and modification in the file ctable.dtx. +%% http://www.latex-project.org/lppl.txt %% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -%%% File: ctable.dtx -\NeedsTeXFormat{LaTeX2e} +%% and version 1.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% + +\NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{ctable} - [2005/08/09 v1.7 LaTeX package ctable] -\RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating} + [2006/10/12 v1.8 ctable package] +\RequirePackage{xspace,color,xkeyval,array,tabularx,booktabs,rotating} \def\NN{\tabularnewline} \def\FL{\toprule} \def\ML{\NN\midrule} @@ -36,7 +36,11 @@ \newdimen\@ctblwidth \newdimen\@ctblcaptionskip \newdimen\@ctblmaxwidth +\newdimen\@ctblmincapwidth \newdimen\@ctblw % the final width +\newdimen\@ctblww +\newdimen\@ctbloldsep +\newdimen\@ctbloldrule \newbox\ctbl@tabelx % the width with X columns \newbox\ctbl@tabel % the width where X is replaced with l \newbox\ctbl@t % the final box will become one of the two above @@ -46,9 +50,13 @@ \define@key{ctbl}{pos}{\def\@ctblpos{#1}\def\@ctblbegin{\@ctblbeg[#1]}}% \define@key{ctbl}{width}{\@ctblwidth=#1}% \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}{rotate}[]{\def\@ctblsideways{sideways}% + \PackageWarning{ctable}{% + using obsolete option 'rotate', use 'sideways' instead} + }% \define@key{ctbl}{figure}[]{\def\@ctbltaborfig{figure}}% \define@key{ctbl}{center}[]{\def\@ctblalign{center}}% \define@key{ctbl}{right}[]{\def\@ctblalign{flushright}}% @@ -65,8 +73,6 @@ \caption[\@ctblcap]{\label{\@ctbllabel}\@ctblcaption} \fi } -\newdimen\@ctbloldsep -\newdimen\@ctbloldrule \def\@ctblframe#1#2#3{% \@ctbloldsep\fboxsep\fboxsep\@ctblframesep% \@ctbloldrule\fboxrule\fboxrule\@ctblframerule% @@ -75,7 +81,7 @@ \newcommand{\tnote}[2][a]{% \hbox{\@textsuperscript{\normalfont\textit{#1}}}\NN} \newcommand{\tmark}[1][a]{% - \hbox{\@textsuperscript{\normalfont\textit{#1}}}} + \hbox{\@textsuperscript{\normalfont\textit{#1\xspace}}}} \newcommand{\ctable}[4][]{% \def\@ctbltaborfig{table}% \def\@ctblalign {center}% @@ -96,6 +102,7 @@ \@ctblframesep0pt \@ctblwidth=0pt \@ctblmaxwidth=0pt + \@ctblmincapwidth=0pt \setkeys{ctbl}{#1}% \ifdim\@ctblwidth=0pt\else \ifdim\@ctblmaxwidth=0pt\else @@ -142,15 +149,19 @@ \fi \fi \@ctblw=\wd\ctbl@t + \ifdim\@ctblmincapwidth=0pt\@ctblww=\@ctblw\else% + \settowidth{\@ctblww}{Table 1: \@ctblcaption} + \ifdim\@ctblww>\@ctblmincapwidth\@ctblww=\@ctblmincapwidth\fi% + \fi \@ctblbegin \begin{\@ctblalign} - \begin{minipage}{\@ctblw} + \begin{minipage}{\@ctblww} \ifx\@ctblbotcap\empty\@ctblCaption\vspace{\@ctblcaptionskip}\fi - \usebox\ctbl@t % insert the tabular + \centering{\usebox\ctbl@t} % insert the tabular \def\@ctblfootnotes{#3} \ifx#3\empty\else % append footnotes, if any \\ - \begin{tabularx}{\@ctblw}{r@{\,}>{\footnotesize\raggedright}X} + \begin{tabularx}{\hsize}{r@{\,}>{\footnotesize\raggedright}X} #3 \end{tabularx} \fi -- cgit v1.2.3