summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/ctable/ctable.sty94
1 files changed, 48 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty
index 5230770a9ff..20be2e8eeae 100644
--- a/Master/texmf-dist/tex/latex/ctable/ctable.sty
+++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty
@@ -23,8 +23,8 @@
%%% File: ctable.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ctable}
- [2004/06/19 v1.6b LaTeX package ctable]
-\RequirePackage{color,keyval,array,tabularx,booktabs,rotating}
+ [2005/08/09 v1.7 LaTeX package ctable]
+\RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating}
\def\NN{\tabularnewline}
\def\FL{\toprule}
\def\ML{\NN\midrule}
@@ -34,29 +34,31 @@
\newdimen\@ctblframesep
\newdimen\@ctblframerule
\newdimen\@ctblwidth
+\newdimen\@ctblcaptionskip
\newdimen\@ctblmaxwidth
\newdimen\@ctblw % the final width
\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
-\define@key{ctbl}{caption} {\def\@ctblcaption {#1}}
-\define@key{ctbl}{cap} {\def\@ctblcap {#1}}
-\define@key{ctbl}{label} {\def\@ctbllabel {#1}}
-\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}{botcap}[]{\def\@ctblbotcap {1}}
-\define@key{ctbl}{rotate}[]{\def\@ctblrotate {sideways}}
-\define@key{ctbl}{figure}[]{\def\@ctbltaborfig{figure}}
-\define@key{ctbl}{center}[]{\def\@ctblalign {center}}
-\define@key{ctbl}{right} []{\def\@ctblalign {flushright}}
-\define@key{ctbl}{left} []{\def\@ctblalign {flushleft}}
-\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}{caption}{\def\@ctblcaption{#1}}%
+\define@key{ctbl}{cap}{\def\@ctblcap{#1}}%
+\define@key{ctbl}{label}{\def\@ctbllabel{#1}}%
+\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}{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}[]{\def\@ctblalign{center}}%
+\define@key{ctbl}{right}[]{\def\@ctblalign{flushright}}%
+\define@key{ctbl}{left}[]{\def\@ctblalign{flushleft}}%
+\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}%
\def\@ctblCaption{
\ifx\@ctblcap\empty\let\@ctblcap\@ctblcaption\fi
\ifx\@ctblcaption\empty\else
@@ -74,26 +76,27 @@
\hbox{\@textsuperscript{\normalfont\textit{#1}}}&#2\NN}
\newcommand{\tmark}[1][a]{%
\hbox{\@textsuperscript{\normalfont\textit{#1}}}}
-\newcommand{\ctable}[4][]{
- \def\@ctbltaborfig{table}
- \def\@ctblalign {center}
- \def\@ctblrotate {}
- \def\@ctblpos {}
- \def\@ctblcaption {}
- \def\@ctblcap {}
- \def\@ctbllabel {}
- \def\@ctblbeg {\begin{\@ctblrotate\@ctbltaborfig\@ctblstarred}}
- \def\@ctblbegin {\@ctblbeg}
- \def\@ctblend {\end{\@ctblrotate\@ctbltaborfig\@ctblstarred}}
- \def\@ctblbotcap {}
- \def\@ctblstarred {}
- \definecolor{@ctblframefg}{rgb}{0,0,0}
- \definecolor{@ctblframebg}{rgb}{1,1,1}
+\newcommand{\ctable}[4][]{%
+ \def\@ctbltaborfig{table}%
+ \def\@ctblalign {center}%
+ \def\@ctblsideways {}%
+ \def\@ctblpos {}%
+ \def\@ctblcaption {}%
+ \def\@ctblcap {}%
+ \def\@ctbllabel {}%
+ \def\@ctblbeg {\begin{\@ctblsideways\@ctbltaborfig\@ctblstarred}}%
+ \def\@ctblbegin {\@ctblbeg}%
+ \def\@ctblend {\end{\@ctblsideways\@ctbltaborfig\@ctblstarred}}%
+ \def\@ctblbotcap {}%
+ \def\@ctblstarred {}%
+ \definecolor{@ctblframefg}{rgb}{0,0,0}%
+ \definecolor{@ctblframebg}{rgb}{1,1,1}%
\@ctblframerule0pt
+ \@ctblcaptionskip2ex
\@ctblframesep0pt
\@ctblwidth=0pt
\@ctblmaxwidth=0pt
- \setkeys{ctbl}{#1}
+ \setkeys{ctbl}{#1}%
\ifdim\@ctblwidth=0pt\else
\ifdim\@ctblmaxwidth=0pt\else
\PackageError{ctable}{
@@ -102,9 +105,9 @@
\fi
\fi
\ifx\@ctblpos\empty\else
- \ifx\@ctblrotate\empty\else
+ \ifx\@ctblsideways\empty\else
\PackageError{ctable}{
- You may not use the pos and rotate options together}{%
+ You may not use the pos and sideways options together}{%
Rotated tables and figures are always typeset on a separate page}
\fi
\fi
@@ -116,8 +119,7 @@
#4
\end{tabular}%
}%
- }
-
+ }%
\sbox\ctbl@tabelx{%
\newcolumntype{X}{Y}% restore X
\@ctblframe{@ctblframefg}{@ctblframebg}{%
@@ -125,25 +127,25 @@
#4
\end{tabularx}%
}%
- }
+ }%
\ifdim\@ctblmaxwidth=0pt
\ifdim\@ctblwidth=0pt
- \sbox{\ctbl@t}{\usebox\ctbl@tabel}
+ \sbox{\ctbl@t}{\usebox\ctbl@tabel}%
\else
- \sbox{\ctbl@t}{\usebox\ctbl@tabelx}
+ \sbox{\ctbl@t}{\usebox\ctbl@tabelx}%
\fi
\else
\ifdim\wd\ctbl@tabel>\@ctblmaxwidth
- \sbox{\ctbl@t}{\usebox\ctbl@tabelx}
+ \sbox{\ctbl@t}{\usebox\ctbl@tabelx}%
\else
- \sbox{\ctbl@t}{\usebox\ctbl@tabel}
+ \sbox{\ctbl@t}{\usebox\ctbl@tabel}%
\fi
\fi
\@ctblw=\wd\ctbl@t
\@ctblbegin
\begin{\@ctblalign}
\begin{minipage}{\@ctblw}
- \ifx\@ctblbotcap\empty\@ctblCaption\vspace{2ex}\fi
+ \ifx\@ctblbotcap\empty\@ctblCaption\vspace{\@ctblcaptionskip}\fi
\usebox\ctbl@t % insert the tabular
\def\@ctblfootnotes{#3}
\ifx#3\empty\else % append footnotes, if any