summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctable
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-17 00:14:36 +0000
committerKarl Berry <karl@freefriends.org>2009-09-17 00:14:36 +0000
commitea6b77b4ca75244e8aea9fcecaff57fc2fd0677e (patch)
tree25fb0fc67996cb42820cfca6bf483bc919e89dfd /Master/texmf-dist/tex/latex/ctable
parent8d289093dedafa414c283acce31d2d754f2eec16 (diff)
ctable 1.14 (16sep09)
git-svn-id: svn://tug.org/texlive/trunk@15322 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctable')
-rw-r--r--Master/texmf-dist/tex/latex/ctable/ctable.sty95
1 files changed, 46 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty
index 6b799de1e0f..8e4028002b4 100644
--- a/Master/texmf-dist/tex/latex/ctable/ctable.sty
+++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty
@@ -22,16 +22,16 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ctable}
- [2008/05/01 v1.13 ctable package]
-\RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating,caption}
+ [2009/09/15 v1.14 ctable package]
+\RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating}
\def\NN{\tabularnewline}
\def\FL{\toprule}
\def\ML{\NN\midrule}
\def\LL{\NN\bottomrule}
\def\@ctblfgcolor#1 #2 #3={\definecolor{@ctblframefg}{rgb}{#1,#2,#3}}
\def\@ctblbgcolor#1 #2 #3={\definecolor{@ctblframebg}{rgb}{#1,#2,#3}}
-\let\@cttextsuperscript\@textsuperscript
-\def\@ctcopy#1{\footnotesize #1}
+\def\@ctbltextsuperscript#1{\ifx\@ctblnosuper\empty\@textsuperscript{#1}\else{\footnotesize#1}\fi}
+\def\@ctbldoinside{\relax}
\newdimen\@ctblframesep
\newdimen\@ctblframerule
\newdimen\@ctblwidth
@@ -58,35 +58,29 @@
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}{center}[]{\let\@ctblalign\centering}
+\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}[]{\let\@cttextsuperscript\@ctcopy}
+\define@key{ctbl}{nosuper}[]{\def\@ctblnosuper{1}}
\define@key{ctbl}{notespar}[]{\def\@ctblnotespar{1}}
-\long\def\@caption#1[#2]#3{%
- \par
- \ifx#2\empty\else\addcontentsline{\csname ext@#1\endcsname}{#1}%
- {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}\fi%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
- \endgroup}
+\define@key{ctbl}{doinside}{\def\@ctbldoinside{#1}}
\def\@ctblCaption{
\ifx\@ctblcap\undefined\let\@ctblcap\@ctblcaption\fi
\ifx\@ctblcaption\empty\else
- \caption[\@ctblcap]{\label{\@ctbllabel}\@ctblcaption\ \@ctblcontinued}
+ \caption[\@ctblcap]{\ifx\@ctbllabel\empty\else\label{\@ctbllabel}\fi\@ctblcaption\ \@ctblcontinued\strut}
\fi
}
+\newcolumntype{Y}{X}
+\def\@ctblXcolumntype#1{
+ \let\NC@find@X\undefined
+ \newcolumntype{X}{#1}
+}
\def\@ctblframe#1#2#3{%
\@ctbloldsep\fboxsep\fboxsep\@ctblframesep%
\@ctbloldrule\fboxrule\fboxrule\@ctblframerule%
@@ -94,16 +88,16 @@
}
\newcommand{\tnote}[2][a]{%
\ifx\@ctblnotespar\empty%
- \hbox{\@cttextsuperscript{\normalfont\textit{#1}}}&#2\NN
+ \hbox{\@ctbltextsuperscript{\normalfont\textit{#1}}}&#2\NN
\else%
- \@cttextsuperscript{\normalfont\textit{#1}}\,#2
+ \@ctbltextsuperscript{\normalfont\textit{#1}}\,#2
\fi
}
\newcommand{\tmark}[1][a]{%
\hbox{\textsuperscript{\normalfont\textit{#1}}}}
\newcommand{\ctable}[4][]{%
\def\@ctbltaborfig{table}%
- \def\@ctblalign {center}%
+ \let\@ctblalign\centering%
\def\@ctblsideways{}%
\def\@ctblcontinued{}%
\def\@ctblpos {}%
@@ -115,11 +109,12 @@
\def\@ctblend {\end{\@ctblsideways\@ctbltaborfig\@ctblstarred}}%
\def\@ctblbotcap {}%
\def\@ctblstarred {}%
+ \def\@ctblnosuper{}
\def\@ctblnotespar{}%
\definecolor{@ctblframefg}{rgb}{0,0,0}%
\definecolor{@ctblframebg}{rgb}{1,1,1}%
\@ctblframerule0pt
- \@ctblcaptionskip0ex
+ \@ctblcaptionskip=0ex
\@ctblframesep0pt
\@ctblwidth=0pt
\@ctblmaxwidth=0pt
@@ -146,10 +141,10 @@
Such a label can't be referenced}
\fi
\fi
- \newcolumntype{Y}{X}% save the X type
\sbox\ctbl@t{%
- \newcolumntype{X}{l}% temporarily make type X = l
+ \@ctblXcolumntype{l}% temporarily make type X = l
\@ctblframe{@ctblframefg}{@ctblframebg}{%
+ \@ctbldoinside
\begin{tabular}{#2}
#4%
\end{tabular}%
@@ -168,8 +163,9 @@
\fi
\if@ctblusex
\sbox\ctbl@t{%
- \newcolumntype{X}{Y}% restore X
+ \@ctblXcolumntype{Y}% restore X
\@ctblframe{@ctblframefg}{@ctblframebg}{%
+ \@ctbldoinside
\begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2}
#4%
\end{tabularx}%
@@ -183,28 +179,29 @@
\@ctblw
\fi
\@ctblbegin
- \ifx\@ctblcontinued\empty\else\ContinuedFloat\fi
- \begin{\@ctblalign}
- \begin{minipage}{\@ctblfloatwidth}\parindent0pt
- \ifx\@ctblbotcap\empty\@ctblCaption\vskip\@ctblcaptionskip\fi
- \centering{\usebox\ctbl@t} % insert the tabular
- \def\@ctblfootnotes{#3}%
- \ifx#3\empty\else % append footnotes, if any
- \ifx\@ctblnotespar\empty%
- \\
- \begin{tabularx}{\hsize}{r@{\,}>{\footnotesize\raggedright}X}
- #3%
- \end{tabularx}%
- \else%
- \\[.2ex]
- \begin{minipage}{\hsize}\footnotesize\raggedright%
- #3%
- \end{minipage}%
- \fi
+ \ifx\@ctblcontinued\empty\else\addtocounter{\@ctbltaborfig}{-1}\fi
+ \@ctblalign
+ \begin{minipage}{\@ctblfloatwidth}\parindent0pt
+ \ifx\@ctblbotcap\empty\@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%
+ \\[.2ex]
+ \begin{minipage}{\hsize}\raggedright%
+ #3%
+ \end{minipage}%
\fi
- \ifx\@ctblbotcap\empty\else\vskip\@ctblcaptionskip\@ctblCaption\fi
- \end{minipage}
- \end{\@ctblalign}
+ }
+ \fi
+ \ifx\@ctblbotcap\empty\else\vskip\@ctblcaptionskip\@ctblCaption\fi
+ \end{minipage}
\@ctblend
}
\endinput