summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctable
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-28 23:18:30 +0000
committerKarl Berry <karl@freefriends.org>2013-04-28 23:18:30 +0000
commitf5e7ac879be880f67746b785fa8060fcc0e4d8d9 (patch)
tree5e3bd27e7b20d54a4451a47f667cabae1e1aed13 /Master/texmf-dist/tex/latex/ctable
parent6b81c4307611bdb01ffbced307b4b29133f2fbf0 (diff)
sansmathfonts (28apr13)
git-svn-id: svn://tug.org/texlive/trunk@30147 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, 64 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty
index f5f7304a58e..3049af303c9 100644
--- a/Master/texmf-dist/tex/latex/ctable/ctable.sty
+++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty
@@ -22,9 +22,16 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ctable}
- [2012/05/28 v1.23 ctable package]
-\RequirePackage{color,xkeyval,array,tabularx,booktabs,rotating}
-\RequirePackage{etoolbox}
+ [2013/04/28 v1.24 Easy, key=value directed, option-rich, typesetting of floats]
+\RequirePackage{ifpdf,xcolor,xkeyval,array,tabularx,booktabs,rotating}
+\ifpdf
+ \RequirePackage{transparent}
+\else
+ \PackageWarningNoLine{ctable}{\MessageBreak
+ Transparency disabled: pdfTeX is not running in PDF mode
+ }
+ \def\transparent#1{}
+\fi
\def\NN{\tabularnewline}
\def\FL{\toprule}
\def\ML{\NN\midrule}
@@ -43,6 +50,11 @@
\def\@ctbltrue{1}
\def\@ctblfalse{0}
\def\@ctbldoinside{\relax}
+\newif\if@ctblusex
+\newif\if@ctblinmemoir
+\newif\if@ctblhascaption
+\@ifclassloaded{memoir}{\@ctblinmemoirtrue}{\@ctblinmemoirfalse}
+\@ifpackageloaded{caption}{\@ctblhascaptiontrue}{\@ctblhascaptionfalse}
\newdimen\@ctblframesep \newdimen\@defaultctblframesep
\newdimen\@ctblframerule \newdimen\@defaultctblframerule
\newdimen\@ctblwidth \newdimen\@defaultctblwidth
@@ -56,6 +68,7 @@
\newdimen\@ctbloldrule
\newbox\ctbl@t % tabular saved and measured here
+\define@key{suctbl}{bgopacity}{\def\@defaultctblbgopacity{#1}}
\define@key{suctbl}{botcap}[]{\let\@defaultctblbotcap\@ctbltrue}
\define@key{suctbl}{captionsinside}[]{\def\rot@LR{-1}
\if@twoside\@rot@twosidetrue
@@ -91,26 +104,28 @@
\newcommand{\setupctable}[1]{\setkeys{suctbl}{#1}}
\setupctable{
- table,
+ bgopacity=1,
+ captionskip=0pt,
+ center,
continued=(continued),
- topcap,
+ doinside={},
+ footerwidth=0pt,
+ framebg=1 1 1,
+ framefg=0 0 0,
framerule=0pt,
- captionskip=0pt,
framesep=0pt,
- width=0pt,
maxwidth=0pt,
mincapwidth=0pt,
- footerwidth=0pt,
+ nonotespar,
nosideways,
- center,
nostar,
super,
- nonotespar,
- doinside={},
- framebg=1 1 1,
- framefg=0 0 0,
+ table,
+ topcap,
+ width=0pt,
}
+\define@key{ctbl}{bgopacity}{\def\@ctblbgopacity{#1}}
\define@key{ctbl}{botcap}[]{\let\@ctblbotcap\@ctbltrue}
\define@key{ctbl}{captionskip}{\@ctblcaptionskip=#1}
\define@key{ctbl}{caption}{\def\@ctblcaption{#1}}
@@ -135,27 +150,26 @@
\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}{sidecap}[]{\let\@ctblbotcap\undefined}
\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}
+\newcommand{\ctbl@expandonce}[1]{\unexpanded\expandafter{#1}}
\def\@ctblCaption{
- \ifx\@ctblcap\undefined\let\@ctblcap\@ctblcaption\fi
\ifx\@ctblcaption\empty\else
\def\@ctblcaptionarg{\ifx\@ctbllabel\empty\else\label{\@ctbllabel}\fi
\@ctblcaption\ \@ctblcontinued\strut}
- \ifx\@ctblcap\empty
\begingroup
- \edef\x{\endgroup\noexpand\caption[]{\expandonce\@ctblcaptionarg}}
- \x
- \else
- \begingroup
- \edef\x{\endgroup\noexpand\caption[\expandonce\@ctblcap]%
- {\expandonce\@ctblcaptionarg}}
- \x
- \fi
+ \ifx\@ctblcap\empty
+ \edef\x{\endgroup\noexpand\caption[]{\ctbl@expandonce\@ctblcaptionarg}}
+ \else
+ \edef\x{\endgroup\noexpand\caption[\ctbl@expandonce\@ctblcap]%
+ {\ctbl@expandonce\@ctblcaptionarg}}
+ \fi
+ \x
\fi
}
\newcolumntype{Y}{X}
@@ -166,7 +180,8 @@
\long\def\@ctblframe#1#2#3{%
\@ctbloldsep\fboxsep\fboxsep\@ctblframesep%
\@ctbloldrule\fboxrule\fboxrule\@ctblframerule%
- \fcolorbox{#1}{#2}{\fboxsep\@ctbloldsep\fboxrule\@ctbloldrule #3}%
+ \transparent{\@ctblbgopacity}%
+ \fcolorbox{#1}{#2}{\fboxsep\@ctbloldsep\fboxrule\@ctbloldrule\transparent{1}#3}%
}
\newcommand{\tnote}[2][a]{%
\ifx\@ctblnotespar\@ctbltrue%
@@ -191,6 +206,7 @@
\let\@ctblsuper \@defaultctblsuper
\let\@ctblnotespar \@defaultctblnotespar
\let\@ctbldoinside \@defaultctbldoinside
+ \let\@ctblbgopacity \@defaultctblbgopacity
\@ctblframerule \@defaultctblframerule
\@ctblcaptionskip \@defaultctblcaptionskip
\@ctblframesep \@defaultctblframesep
@@ -204,24 +220,39 @@
\def\@ctblbegin {\@ctblbeg}
\def\@ctblend {\end{\@ctblsideways\@ctbltaborfig\@ctblstarred}}
\setkeys{ctbl}{#1}
+ \ifx\@ctblcap\undefined\let\@ctblcap\@ctblcaption\fi
+ \ifx\@ctblcap\empty
+ \if@ctblhascaption\else
+ \PackageWarningNoLine{ctable}{\MessageBreak
+ An empty cap= option prevents lot/loc entry only\MessageBreak
+ if the caption package is loaded!}
+ \fi
+ \fi
+ \if@ctblinmemoir\else
+ \ifx\@ctblbotcap\undefined
+ \PackageError{ctable}{\MessageBreak
+ You can, currently, use the sidecap option only with memoir documents\MessageBreak
+ Use topcap or botcap only}
+ \fi
+ \fi
\ifdim\@ctblwidth=0pt\else
\ifdim\@ctblmaxwidth=0pt\else
- \PackageError{ctable}{
- You may not use the width and maxwidth options together}{
+ \PackageError{ctable}{\MessageBreak
+ You may not use the width and maxwidth options together\MessageBreak
Use either width or maxwidth}
\fi
\fi
\ifx\@ctblpos\empty
\ifx\@ctblsideways\empty\else
- \PackageError{ctable}{
- You may not use the pos and sideways options together}{
+ \PackageError{ctable}{\MessageBreak
+ You may not use the pos and sideways options together\MessageBreak
Rotated tables and figures are always typeset on a separate page}
\fi
\fi
\ifx\@ctblcaption\empty
\ifx\@ctbllabel\empty\else
- \PackageError{ctable}{
- You may not label a captionless table}{
+ \PackageError{ctable}{\MessageBreak
+ You may not label a captionless table\MessageBreak
Such a label can't be referenced}
\fi
\fi
@@ -234,7 +265,7 @@
\end{tabular}%
}%
}%
- \newif\if@ctblusex\@ctblusexfalse
+ \@ctblusexfalse
\ifdim\@ctblmaxwidth=0pt
\ifdim\@ctblwidth=0pt
\else
@@ -267,6 +298,7 @@
\@ctblalign
\begin{minipage}{\@ctblfloatwidth}\parindent0pt
\ifx\@ctblbotcap\@ctblfalse\@ctblCaption\vskip\@ctblcaptionskip\fi
+ \ifx\@ctblbotcap\undefined\begin{sidecaption}[\@ctblcap]{\@ctblcaption}[ label ]\fi
\centering{\usebox\ctbl@t} % insert the tabular
\def\@ctblfootnotes{#3}%
\ifx#3\empty\else{% append footnotes, if any
@@ -287,6 +319,7 @@
\fi
}
\fi
+ \ifx\@ctblbotcap\undefined\end{sidecaption}\fi
\ifx\@ctblbotcap\@ctbltrue\vskip\@ctblcaptionskip\@ctblCaption\fi
\end{minipage}
\@ctblend