diff options
87 files changed, 745 insertions, 319 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl index 9800c9d995a..025d39fd25d 100755 --- a/Build/cdbuild/ctan2tds.pl +++ b/Build/cdbuild/ctan2tds.pl @@ -118,6 +118,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'coptic', "warn \"skipping coptic, it has been replaced by cbcoptic\n\"", 'corridx', "warn \"skipping corridx, Pascal source\n\"", 'csvtools', "&MAKEflatten", + 'ctable', "&MAKEflatten", 'ctib', "&MAKEflatten", 'cweb', "warn \"skipping cweb, programs\n\"", 'cyrillic', "&MAKEcopy", # we use latex-tds/cyrillic.zip diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check index 167d6e9c39d..b26fbb7753d 100755 --- a/Build/tools/tpm-ctan-check +++ b/Build/tools/tpm-ctan-check @@ -31,7 +31,8 @@ my @WorkingTPM = qw( colortbl colorwav commath compactbib complexity comprehensive computational-complexity cooking cool coollist coolstr cooltooltips coordsys courier-scaled courseoutline coursepaper coverpage - crop crossreference csquotes csvtools ctable cursolatex cursor cuisine + crop crossreference csquotes csvtools ctable + cursolatex cursor cuisine currvita curve curve2e curves custom-bib cyrillic dancers dashbox datatool diff --git a/Master/texmf-dist/doc/latex/ctable/01 b/Master/texmf-dist/doc/latex/ctable/01 new file mode 100644 index 00000000000..61424c03504 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/01 @@ -0,0 +1,14 @@ +\section{Further examples} +In the following, small examples will be shown illustrating the effect of +options. In the left column the relevant part of the source is shown, in the +right column you see the result. In most cases you see a standard example on a +light yellow background, followed by one or more variations on a light blue +background. Where necessary, the example will show boxes to indicate the page +and the text body. + +\subsection{\ttfamily\bfseries figure, botcap} +By default, |ctable| generates a table float, but with the |figure| option, a +figure float is generated instead. The caption stays on top, so if you are +accustomed to have bottom caption for your figures, you will probably also need +the |botcap| option: +$Id: 01,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/01a b/Master/texmf-dist/doc/latex/ctable/01a new file mode 100644 index 00000000000..8f02115c959 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/01a @@ -0,0 +1,3 @@ +\ctable[caption = a table]{c}{ +}{\FL Table's first row\LL} +$Id: 01a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/01a.pdf b/Master/texmf-dist/doc/latex/ctable/01a.pdf Binary files differnew file mode 100644 index 00000000000..aa96c6722b5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/01a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/01b b/Master/texmf-dist/doc/latex/ctable/01b new file mode 100644 index 00000000000..6ab8de43d53 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/01b @@ -0,0 +1,10 @@ +\let\H\hsize +\ctable[ + caption = a figure, + figure, botcap, + width=.4\H, +]{@{}>{\H=.4\H}X>{\H=.6\H}X@{}}{}{\FL + \includegraphics[width=\H]{penguin}& + \includegraphics[width=\H]{lion}\LL +} +$Id: 01b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/01b.pdf b/Master/texmf-dist/doc/latex/ctable/01b.pdf Binary files differnew file mode 100644 index 00000000000..ff026d1e747 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/01b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/02 b/Master/texmf-dist/doc/latex/ctable/02 new file mode 100644 index 00000000000..acc6b0d3f26 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02 @@ -0,0 +1,4 @@ +\subsection{\ttfamily\bfseries center, left, right} +These options align the float in the page; the default is |center|: + +$Id: 02,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/02k b/Master/texmf-dist/doc/latex/ctable/02k new file mode 100644 index 00000000000..34c318a6070 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02k @@ -0,0 +1,4 @@ +\ctable[ + caption = Centered, +]{c}{}{\FL Table's first row\LL} +$Id: 02k,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/02k.pdf b/Master/texmf-dist/doc/latex/ctable/02k.pdf Binary files differnew file mode 100644 index 00000000000..ef3a0563258 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02k.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/02l b/Master/texmf-dist/doc/latex/ctable/02l new file mode 100644 index 00000000000..65a877cd9e2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02l @@ -0,0 +1,5 @@ +\ctable[ + caption = Left, + left +]{c}{}{\FL Table's first row\LL} +$Id: 02l,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/02l.pdf b/Master/texmf-dist/doc/latex/ctable/02l.pdf Binary files differnew file mode 100644 index 00000000000..6c9e51e9359 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02l.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/02m b/Master/texmf-dist/doc/latex/ctable/02m new file mode 100644 index 00000000000..55a1f50d8f8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02m @@ -0,0 +1,5 @@ +\ctable[ + caption = Right, + right +]{c}{}{\FL Table's first row\LL} +$Id: 02m,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/02m.pdf b/Master/texmf-dist/doc/latex/ctable/02m.pdf Binary files differnew file mode 100644 index 00000000000..5a29f27993f --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/02m.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/03 b/Master/texmf-dist/doc/latex/ctable/03 new file mode 100644 index 00000000000..661580203cf --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/03 @@ -0,0 +1,5 @@ +\subsection{\ttfamily\bfseries captionskip} +The distance between a top caption and the table is \texttt{2ex}, +but it can be varied with \texttt{captionskip}: + +$Id: 03,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/03a b/Master/texmf-dist/doc/latex/ctable/03a new file mode 100644 index 00000000000..cf4525f44d3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/03a @@ -0,0 +1,4 @@ +\ctable[ + caption = Caption, +]{c}{}{\FL Table's first row\LL} +$Id: 03a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/03a.pdf b/Master/texmf-dist/doc/latex/ctable/03a.pdf Binary files differnew file mode 100644 index 00000000000..94c8d2797a9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/03a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/03b b/Master/texmf-dist/doc/latex/ctable/03b new file mode 100644 index 00000000000..cb73246e5e5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/03b @@ -0,0 +1,5 @@ +\ctable[ + caption = Caption, +captionskip = 1ex, +]{c}{}{\FL Table's first row\LL} +$Id: 03b,v 1.2 2007/08/13 11:02:10 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/03b.pdf b/Master/texmf-dist/doc/latex/ctable/03b.pdf Binary files differnew file mode 100644 index 00000000000..1f71d1b3f38 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/03b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/04 b/Master/texmf-dist/doc/latex/ctable/04 new file mode 100644 index 00000000000..e7737729d37 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/04 @@ -0,0 +1,4 @@ + +This works for bottom caption, too: + +$Id: 04,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/04a b/Master/texmf-dist/doc/latex/ctable/04a new file mode 100644 index 00000000000..17288330e56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/04a @@ -0,0 +1,5 @@ +\ctable[ + caption = Caption, + botcap +]{c}{}{\FL Table's first row\LL} +$Id: 04a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/04a.pdf b/Master/texmf-dist/doc/latex/ctable/04a.pdf Binary files differnew file mode 100644 index 00000000000..4176397ce8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/04a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/04b b/Master/texmf-dist/doc/latex/ctable/04b new file mode 100644 index 00000000000..d6912fc80ef --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/04b @@ -0,0 +1,6 @@ +\ctable[ + caption = Caption, +captionskip = -2ex, + botcap +]{c}{}{\FL Table's first row\LL} +$Id: 04b,v 1.2 2007/08/13 11:02:10 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/04b.pdf b/Master/texmf-dist/doc/latex/ctable/04b.pdf Binary files differnew file mode 100644 index 00000000000..3e1a0fe4507 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/04b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/05 b/Master/texmf-dist/doc/latex/ctable/05 new file mode 100644 index 00000000000..4f5cb02956e --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/05 @@ -0,0 +1,7 @@ +\subsection{\ttfamily\bfseries mincapwidth} +|ctable| forces caption and footnotes to stay within the width of the table. +Sometimes, however, tables are so narrow, that this is not really what you want. +In such cases, use the |mincapwidth| option to give caption and footnotes some +extra room: + +$Id: 05,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/05a b/Master/texmf-dist/doc/latex/ctable/05a new file mode 100644 index 00000000000..8a1b70b8bb2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/05a @@ -0,0 +1,4 @@ +\ctable[ + caption = a lengthy caption +]{c}{}{\FL test\LL} +$Id: 05a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/05a.pdf b/Master/texmf-dist/doc/latex/ctable/05a.pdf Binary files differnew file mode 100644 index 00000000000..814c9d6f914 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/05a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/05b b/Master/texmf-dist/doc/latex/ctable/05b new file mode 100644 index 00000000000..c92026b8d64 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/05b @@ -0,0 +1,5 @@ +\ctable[ +mincapwidth = 55mm, + caption = a lengthy caption +]{c}{}{\FL test\LL} +$Id: 05b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/05b.pdf b/Master/texmf-dist/doc/latex/ctable/05b.pdf Binary files differnew file mode 100644 index 00000000000..ad4461b9984 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/05b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/06 b/Master/texmf-dist/doc/latex/ctable/06 new file mode 100644 index 00000000000..32d486689fc --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/06 @@ -0,0 +1,20 @@ + +You can set |mincapwidth| to a large value, say |\hsize|, if you want a one-line +caption. Note, however, that this may influence the horizontal positioning of +the table: values larger than |\hsize| will move a centered table out of the +center, a value of |\hsize| will prevent the |left| and |right| options to do +their work, because the table is already captured between the left and right +margins. + +\subsection{\ttfamily\bfseries maxwidth} +When \LaTeX-sources containing tables are generated automatically by a +script, it is often not known in advance what the maximum size of an |l| +column will be. A good solution for this is to use an |X| specifier, +typesetting the table at the text width with the tabularx package. +However, this will result in too much white space in cases where the +column contains small texts only. This problem can be solved by using +the maxwidth option instead of the width option. The |X| specifiers will +then be replaced with |l| as long as the width of the resulting table +stays with the specified maximum width. + +$Id: 06,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/06a b/Master/texmf-dist/doc/latex/ctable/06a new file mode 100644 index 00000000000..30262c73114 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/06a @@ -0,0 +1,6 @@ +\ctable[ + framerule = .1pt, + maxwidth=3cm +]{lX}{}{\FL 1 & first row\LL} + +$Id: 06a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/06a.pdf b/Master/texmf-dist/doc/latex/ctable/06a.pdf Binary files differnew file mode 100644 index 00000000000..60b40417d8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/06a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/06b b/Master/texmf-dist/doc/latex/ctable/06b new file mode 100644 index 00000000000..6cd43e829d9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/06b @@ -0,0 +1,6 @@ +\ctable[ + framerule = .1pt, + maxwidth=3cm +]{lX}{}{\FL 1 & test\LL} + +$Id: 06b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/06b.pdf b/Master/texmf-dist/doc/latex/ctable/06b.pdf Binary files differnew file mode 100644 index 00000000000..7bf3ff160d7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/06b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/07 b/Master/texmf-dist/doc/latex/ctable/07 new file mode 100644 index 00000000000..70c2c553551 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/07 @@ -0,0 +1,5 @@ +\subsection{\ttfamily\bfseries nosuper} +Footnote markers in |ctable| are typeset superscripted by default. Use the +|nosuper| option to place them on the base line: + +$Id: 07,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/07a b/Master/texmf-dist/doc/latex/ctable/07a new file mode 100644 index 00000000000..670e0ab16a9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/07a @@ -0,0 +1,6 @@ +\ctable{c}{ + \tnote{First footnote} + \tnote[b]{Second footnote} +}{\FL Table's\tmark\ first\tmark[b]\ row\LL} + +$Id: 07a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/07a.pdf b/Master/texmf-dist/doc/latex/ctable/07a.pdf Binary files differnew file mode 100644 index 00000000000..3d7e2699d6b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/07a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/07b b/Master/texmf-dist/doc/latex/ctable/07b new file mode 100644 index 00000000000..661e9ed4517 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/07b @@ -0,0 +1,6 @@ +\ctable[nosuper]{c}{ + \tnote[a.]{First footnote} + \tnote[b.]{Second footnote} +}{\FL Table's\tmark\ first\tmark[b]\ row\LL} + +$Id: 07b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/07b.pdf b/Master/texmf-dist/doc/latex/ctable/07b.pdf Binary files differnew file mode 100644 index 00000000000..507defc8301 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/07b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/08 b/Master/texmf-dist/doc/latex/ctable/08 new file mode 100644 index 00000000000..cebeb2af97c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/08 @@ -0,0 +1,11 @@ +\subsection{\ttfamily\bfseries framerule} +The following examples show the use of frames and backgrounds. Every table +is typeset by |ctable| with a frame around it, but the frame is, by default, +drawn with a zero width line, and is therefore invisible. You can make it +visible by either changing the linewidth to a positive value or by giving it a +background color, which will be used to fill the frame. + +Here is a simple table without a frame, followed by one with a red, 1pt thick +frame: + +$Id: 08,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/08a b/Master/texmf-dist/doc/latex/ctable/08a new file mode 100644 index 00000000000..248610d01d2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/08a @@ -0,0 +1,4 @@ +\ctable[ + caption = Frame, +]{c}{}{\FL Table's first row\LL} +$Id: 08a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/08a.pdf b/Master/texmf-dist/doc/latex/ctable/08a.pdf Binary files differnew file mode 100644 index 00000000000..a316649da7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/08a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/08b b/Master/texmf-dist/doc/latex/ctable/08b new file mode 100644 index 00000000000..22120680a8d --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/08b @@ -0,0 +1,6 @@ +\ctable[ + caption = Frame, + framerule = 2pt, + framefg = .8 0 0 +]{c}{}{\FL Table's first row\LL} +$Id: 08b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/08b.pdf b/Master/texmf-dist/doc/latex/ctable/08b.pdf Binary files differnew file mode 100644 index 00000000000..64904a3463b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/08b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/09 b/Master/texmf-dist/doc/latex/ctable/09 new file mode 100644 index 00000000000..5692848409d --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/09 @@ -0,0 +1,6 @@ + +As you see, the frame fits closely to the first (|\FL|) and last (|\LL|) table +lines. This can be a reason to either remove those lines, or to introduce some +whitespace between the frame and the table with the |framesep| option: + +$Id: 09,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/09b b/Master/texmf-dist/doc/latex/ctable/09b new file mode 100644 index 00000000000..0ea2cc41f90 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/09b @@ -0,0 +1,8 @@ +\ctable[ + caption = Frame, + framerule = 1pt, + framefg = .8 0 0, + framesep=10pt +]{c}{}{\FL Table's first row\LL} + +$Id: 09b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/09b.pdf b/Master/texmf-dist/doc/latex/ctable/09b.pdf Binary files differnew file mode 100644 index 00000000000..c92e2d0a4a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/09b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/10 b/Master/texmf-dist/doc/latex/ctable/10 new file mode 100644 index 00000000000..d5766b33ec9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/10 @@ -0,0 +1,5 @@ + +And finally, we could also frame the table by giving it a, say, yellow backgound +instead of a red frame line, or even do both: + +$Id: 10,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/10a b/Master/texmf-dist/doc/latex/ctable/10a new file mode 100644 index 00000000000..e688a1f43fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/10a @@ -0,0 +1,6 @@ +\ctable[ + caption = Frame, + framebg = 1 1 0, + framesep=10pt +]{c}{}{\FL Table's first row\LL} +$Id: 10a,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/10a.pdf b/Master/texmf-dist/doc/latex/ctable/10a.pdf Binary files differnew file mode 100644 index 00000000000..0c7a8f3d180 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/10a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/10b b/Master/texmf-dist/doc/latex/ctable/10b new file mode 100644 index 00000000000..0677caf1177 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/10b @@ -0,0 +1,9 @@ +\ctable[ + caption = Frame, + framerule = 2pt, + framesep = 5pt, + framebg = 1 1 0, + framefg = 1 0 0, + framesep=10pt +]{c}{}{\FL Table's first row\LL} +$Id: 10b,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/10b.pdf b/Master/texmf-dist/doc/latex/ctable/10b.pdf Binary files differnew file mode 100644 index 00000000000..c7c29caadcf --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/10b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/11 b/Master/texmf-dist/doc/latex/ctable/11 new file mode 100644 index 00000000000..a9bb5474b49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11 @@ -0,0 +1,8 @@ +\subsection{\ttfamily\bfseries sideways} +The |sideways| option creates a landscape table with its head pointing at the +spine\,---\,when the documentclass' twoside option has been use, that is. The +following examples show the effect of the |sideways| option, first on page one, +then on page 2. Note that the |caption| option has not been used, so no caption +appears: + +$Id: 11,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/11k b/Master/texmf-dist/doc/latex/ctable/11k new file mode 100644 index 00000000000..f3a46fad745 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11k @@ -0,0 +1,3 @@ +\ctable[ +]{c}{}{\FL first row\LL} +$Id: 11k,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/11k.pdf b/Master/texmf-dist/doc/latex/ctable/11k.pdf Binary files differnew file mode 100644 index 00000000000..f334e24f549 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11k.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/11l b/Master/texmf-dist/doc/latex/ctable/11l new file mode 100644 index 00000000000..689c36a1ab4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11l @@ -0,0 +1,4 @@ +\ctable[ + sideways +]{c}{}{\FL first row\LL} +$Id: 11l,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/11l.pdf b/Master/texmf-dist/doc/latex/ctable/11l.pdf Binary files differnew file mode 100644 index 00000000000..53753b058d0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11l.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/11m b/Master/texmf-dist/doc/latex/ctable/11m new file mode 100644 index 00000000000..82b2900d1eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11m @@ -0,0 +1,5 @@ +\setcounter{page}{2} +\ctable[ + sideways +]{c}{}{\FL first row\LL} +$Id: 11m,v 1.1 2007/07/22 15:30:56 wybo Exp $ diff --git a/Master/texmf-dist/doc/latex/ctable/11m.pdf b/Master/texmf-dist/doc/latex/ctable/11m.pdf Binary files differnew file mode 100644 index 00000000000..6cc70fe34e8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/11m.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/README b/Master/texmf-dist/doc/latex/ctable/README new file mode 100644 index 00000000000..3c36e1fda55 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/README @@ -0,0 +1,25 @@ +[From the submission email of Wybo, at 13 Aug 2007] + +- ctable.sty provides commands to easily typeset centered or left or + right aligned tables and (multiple-)figure floats, with footnotes. + Instead of an environment, a command with 4 arguments is used; the + first is optional and is used for key,value pairs generating + variations on the defaults and offering a route for future + extensions. + +- LPPL + +- major changes (relative to v1.9): + + - Footnote markers in the text now stay superscript with nosuper. + + - Documentation: added many examples for the options. + + - Corrected some unwanted white space in captions. + + - Caption package included to correct booktabs errors + in caption position. As a consequence: + + - *Captionskip option redefined*: 0pt value now corresponds + to LaTeX defaults + diff --git a/Master/texmf-dist/doc/latex/ctable/ctable.pdf b/Master/texmf-dist/doc/latex/ctable/ctable.pdf Binary files differindex af3adf8973a..8e47a7afc12 100644 --- a/Master/texmf-dist/doc/latex/ctable/ctable.pdf +++ b/Master/texmf-dist/doc/latex/ctable/ctable.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s01a.pdf b/Master/texmf-dist/doc/latex/ctable/s01a.pdf Binary files differnew file mode 100644 index 00000000000..39f72b55d80 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s01a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s01b.pdf b/Master/texmf-dist/doc/latex/ctable/s01b.pdf Binary files differnew file mode 100644 index 00000000000..c0d5ad439bf --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s01b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s02k.pdf b/Master/texmf-dist/doc/latex/ctable/s02k.pdf Binary files differnew file mode 100644 index 00000000000..d8eb27fa718 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s02k.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s02l.pdf b/Master/texmf-dist/doc/latex/ctable/s02l.pdf Binary files differnew file mode 100644 index 00000000000..937aa36a82d --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s02l.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s02m.pdf b/Master/texmf-dist/doc/latex/ctable/s02m.pdf Binary files differnew file mode 100644 index 00000000000..c10d5da32dc --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s02m.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s03a.pdf b/Master/texmf-dist/doc/latex/ctable/s03a.pdf Binary files differnew file mode 100644 index 00000000000..620e5a35c9d --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s03a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s03b.pdf b/Master/texmf-dist/doc/latex/ctable/s03b.pdf Binary files differnew file mode 100644 index 00000000000..691dfc09e71 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s03b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s04a.pdf b/Master/texmf-dist/doc/latex/ctable/s04a.pdf Binary files differnew file mode 100644 index 00000000000..8005acbd207 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s04a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s04b.pdf b/Master/texmf-dist/doc/latex/ctable/s04b.pdf Binary files differnew file mode 100644 index 00000000000..192420fe5d0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s04b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s05a.pdf b/Master/texmf-dist/doc/latex/ctable/s05a.pdf Binary files differnew file mode 100644 index 00000000000..d552ae521f8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s05a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s05b.pdf b/Master/texmf-dist/doc/latex/ctable/s05b.pdf Binary files differnew file mode 100644 index 00000000000..82253a0cb75 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s05b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s06a.pdf b/Master/texmf-dist/doc/latex/ctable/s06a.pdf Binary files differnew file mode 100644 index 00000000000..587320d2d8f --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s06a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s06b.pdf b/Master/texmf-dist/doc/latex/ctable/s06b.pdf Binary files differnew file mode 100644 index 00000000000..18318eb9478 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s06b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s07a.pdf b/Master/texmf-dist/doc/latex/ctable/s07a.pdf Binary files differnew file mode 100644 index 00000000000..1de18de638f --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s07a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s07b.pdf b/Master/texmf-dist/doc/latex/ctable/s07b.pdf Binary files differnew file mode 100644 index 00000000000..df0dcdbce84 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s07b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s08a.pdf b/Master/texmf-dist/doc/latex/ctable/s08a.pdf Binary files differnew file mode 100644 index 00000000000..d30181550db --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s08a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s08b.pdf b/Master/texmf-dist/doc/latex/ctable/s08b.pdf Binary files differnew file mode 100644 index 00000000000..3407a1fbacd --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s08b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s09b.pdf b/Master/texmf-dist/doc/latex/ctable/s09b.pdf Binary files differnew file mode 100644 index 00000000000..45659eccdda --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s09b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s10a.pdf b/Master/texmf-dist/doc/latex/ctable/s10a.pdf Binary files differnew file mode 100644 index 00000000000..e97e103699c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s10a.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s10b.pdf b/Master/texmf-dist/doc/latex/ctable/s10b.pdf Binary files differnew file mode 100644 index 00000000000..6fc97234952 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s10b.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s11k.pdf b/Master/texmf-dist/doc/latex/ctable/s11k.pdf Binary files differnew file mode 100644 index 00000000000..d2a2108756a --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s11k.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s11l.pdf b/Master/texmf-dist/doc/latex/ctable/s11l.pdf Binary files differnew file mode 100644 index 00000000000..a29e0d88baa --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s11l.pdf diff --git a/Master/texmf-dist/doc/latex/ctable/s11m.pdf b/Master/texmf-dist/doc/latex/ctable/s11m.pdf Binary files differnew file mode 100644 index 00000000000..ab57b39bda1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/s11m.pdf diff --git a/Master/texmf-dist/source/latex/ctable/ctable.dtx b/Master/texmf-dist/source/latex/ctable/ctable.dtx index dc7eea5a402..28ed1e851ab 100644 --- a/Master/texmf-dist/source/latex/ctable/ctable.dtx +++ b/Master/texmf-dist/source/latex/ctable/ctable.dtx @@ -1,9 +1,8 @@ - % \iffalse meta-comment % % Copyright (C) 2005 by Wybo Dekker <wybo@servalys.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 or (at your option) any later version. @@ -11,9 +10,6 @@ % % http://www.latex-project.org/lppl.txt % -% and version 1.2 or later is part of all distributions of LaTeX -% version 1999/12/01 or later. -% % \fi % % \iffalse @@ -23,30 +19,65 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{ctable} %<*package> - [2007/03/04 v1.9 ctable package] + [2007/08/17 v1.10 ctable package] %</package> % %<*driver> -\documentclass[a4paper]{ltxdoc} -\usepackage{carom,txfonts,ctable,makeidx} +\documentclass{ltxdoc} +\usepackage{carom,ctable,txfonts} \usepackage[ verbose, pdftex, paper=a4paper, - bottom=35mm, + bottom=30mm, nohead ]{geometry} -\parindent0pt -\EnableCrossrefs -\CodelineIndex +\usepackage{hyperref} +\graphicspath{{./doc/}} +\definecolor{vbgreen}{rgb}{0,.6,0} +\definecolor{B}{rgb}{0.77, 0.90, 0.96} +\definecolor{Y}{rgb}{1,1,.878} +\def\URL#1{http://www.ctan.org/tex-archive/help/Catalogue/entries/#1.html} +\def\REF#1{\href{\URL{#1}}{\texttt{#1}}} +\parindent0pt\parskip1ex +\long\def\ROW#1#2#3{\noindent\parskip0pt% + %\fboxsep0pt + \colorbox{#1}{% + \parbox{.98\hsize}{% + \rule{0pt}{1.5ex}\\ + \parbox{.5\hsize}{\includegraphics{#2}} + \parbox{.5\hsize}{\centering{\includegraphics{#3}}} + \\\rule{0pt}{1.5ex} + } + }\par +} +\AtBeginDocument{\RecordChanges} +\AtEndDocument{\PrintChanges} +\EnableCrossrefs +\hypersetup{ + colorlinks = true, + pdftitle = The ctable package, + pdfauthor = Wybo Dekker, + pdfsubject = {Typesetting centered, right, and left aligned table and figure + floats, with many configuration options}, + pdfkeywords = { + table floats, + figure floats, + key=value options, + footnotes, + booktabs, + tabularx, + threeparttable + }, + bookmarksopen +} \begin{document} \DocInput{ctable.dtx} -\PrintIndex \end{document} %</driver> % \fi % -% \CheckSum{335} +% \CheckSum{323} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -65,64 +96,81 @@ % Right brace \} Tilde \~} % % -% \changes{v1.0}{2000/06/01}{First release.} -% \changes{v1.1}{2001/03/17}{Making use of booktabs package} -% \changes{v1.2}{2002/06/24}{Using keyval to reduce args to 4} -% \changes{v1.3}{2002/07/16}{Many syntactic correction, +% \changes{v1.00}{2000/06/01}{First release.} +% \changes{v1.01}{2001/03/17}{Making use of booktabs package} +% \changes{v1.02}{2002/06/24}{Using keyval to reduce args to 4} +% \changes{v1.03}{2002/07/16}{Many syntactic corrections, % thanks to Johannes Braams} -% \changes{v1.4}{2003/08/11}{Caption, if empty, will not be typeset +% \changes{v1.04}{2003/08/11}{Caption, if empty, will not be typeset % rotate option added % star option added to use table* and figure* % environments} -% \changes{v1.6}{2004/03/20}{left, right and center options added +% \changes{v1.06}{2004/03/20}{left, right and center options added % frame{sep,rule,fg,bg} options added % error in width-setting corrected} -% \changes{v1.5}{2003/10/03}{maxwidth option added} -% \changes{v1.6a}{2004/04/01}{two errors corrected: +% \changes{v1.05}{2003/10/03}{maxwidth option added} +% \changes{v1.06a}{2004/04/01}{two errors corrected: % made setting fboxsep and fboxrule only temporary % removed superfluous space after tabulars} -% \changes{v1.6b}{2004/06/19}{Added several % at eol to remove superfluous +% \changes{v1.06b}{2004/06/19}{Added several % at eol to remove superfluous % whitespace occurring sometimes} -% \changes{v1.7}{2005/08/09}{Added option sideways, option rotate now obsolete; +% \changes{v1.07}{2005/08/09}{Added option sideways, option rotate now obsolete; % added option captionskip} -% \changes{v1.8}{2006/04/10}{Standardized file setup following +% \changes{v1.08}{2006/04/10}{Standardized file setup following % http://www.ctan.org/tex-archive/info/dtxtut/dtxtut.pdf % mincapwidth option added % Moved newdimen definition outside ctable macro % } -% \changes{v1.9}{2007/03/04}{Added option nosuper; -% corrected incorrect positioning when table is wider than -% mincapwidth } +% \changes{v1.09}{2007/03/04}{Added option nosuper; +% corrected incorrect positioning when table is wider than +% mincapwidth} +% \changes{v1.10}{2007/08/17}{Footnote markers now stay superscript with nosuper. +% Documentation: added many examples for the options. +% Corrected some unwanted white space in captions. +% Caption package included to correct booktabs +% errors in caption position. And for later use of +% its facilities. *Captionskip option redefined*: 0pt +% value now corresponds to LaTeX defaults +% } % % \GetFileInfo{ctable.dtx} % -% \DoNotIndex{ \newcommand, \\, \,, -% \def, \definecolor, \hbox, \raggedright, -% \FL, \else, \ifdim, \sbox, -% \LL, \empty, \ifx, \setkeys, -% \ML, \end, \label, \specialrule, -% \NN, \fboxrule, \let, \tabularnewline, -% \PackageError, \fboxsep, \newbox, \textit, -% \PackageWarning, \fcolorbox, \newcolumntype, \usebox, -% \RequirePackage, \fi, \newdimen, \vspace, -% \begin, \footnotesize, \normalfont, \wd, +% \DoNotIndex{ \newcommand, \\, \,, +% \def, \definecolor, \hbox, \raggedright, +% \else, \ifdim, \sbox, \empty, +% \ifx, \setkeys, \end, \label, +% \specialrule, \fboxrule, \let, \tabularnewline, +% \PackageError, \fboxsep, \newbox, \textit, +% \PackageWarning, \fcolorbox, \newcolumntype, \usebox, +% \RequirePackage, \fi, \newdimen, \vspace, +% \begin, \footnotesize, \normalfont, \wd, % \define@key, % } -% +% % \title{The \textsf{ctable} package\thanks{This document % corresponds to \textsf{ctable}~\fileversion, dated \filedate.}} % \author{Wybo Dekker \\ \texttt{wybo@servalys.nl}} % % \maketitle +% \begin{abstract}\noindent +% The \texttt{ctable} package provides a \texttt{ctable} +% command for the typesetting of table and figure floats. You will +% not need to type the usual nested begin...end sequences, as +% \texttt{ctable} is a command, not an environment. \texttt{ctable} +% has only 4 arguments, but the optional first one may hold many +% \textsl{key=value} pairs and makes \texttt{ctable} very flexible +% and extensible. It uses Simon Fear's \REF{booktabs} package for +% better vertical spacing around horizontal rules and it provides +% facilities for making table footnotes. +% \end{abstract} % % \section{Purpose} The |ctable| package lets you easily typeset % captioned table and figure floats with optional -% footnotes. Both caption and footnotes will be forced within the +% footnotes. Both caption and footnotes will normally be forced within the % width of the table. -% -% If the width of the table is specified, then tabularx will be used -% to typeset it, and the |X| column specifier can be used. Otherwise -% tabular will be used. +% If the width of the table is specified, then \REF{tabularx} will be used +% to typeset it, and one or more |X| column specifiers should be specified. +% Otherwise tabular will be used. % % This package defines the commands |\ctable|, % |\tnote| and |\tmark|, as well as four |\tabularnewline| generating @@ -130,11 +178,11 @@ % around horizontal rules and are also useful for tabulars outside % this package. % -% Since the |ctable| package imports the |array| and |booktabs| +% Since the |ctable| package imports the \REF{array} and \REF{booktabs} % packages, all commands from those packages are available as well. % % Note that, in line with the comments that Simon Fear made -% describing his |booktabs| package, vertical rules for column +% describing his \REF{booktabs} package, vertical rules for column % separation can be produced with |\ctable|, but no provisions are % made to have them make contact with horizontal rules. % @@ -145,7 +193,7 @@ % |\ctable[options] % key=value,...|\\ % | {coldefs} % for \begin{tabular}|\\ % | {foottable} % zero or more \tnote commands (see below)|\\ -% | {table lines} % lines for the table|\\ +% | {table rows} % rows for the table|\\ % % Options are given as key=value pairs, separated by comma's. % Extra comma's, including one behind the last pair, don't hurt. @@ -155,78 +203,82 @@ % \\[2ex] % \begin{tabularx}{\hsize}{@{}lX@{}} % |caption={...}|& table caption; the braces are needed only if your -% caption contains a comma or an equals sign.\NN +% caption contains a comma or an equals sign.\NN[1ex] % -% |cap={...}| & for a short caption to go to the |\tableofcontents|.\NN +% |cap={...}| & for a short caption to go to the |\tableofcontents|.\NN[1ex] % -% |captionskip=...| & set the whitespace between the caption and the table; -% default is |2ex|.\NN +% |captionskip=...| & moves the caption relative to the table; +% the default is |0ex|, which puts captions at +% their default \LaTeX\ positions: a top +% caption's baseline at |1ex| above the top rule +% position of the table and a bottom caption's +% baseline at |4ex| below the bottom rule +% position.\NN[1ex] % -% |mincapwidth=...| & sets the minimum width of the caption. -% Useful for very narrow tables. If the given width -% is larger than de caption's actual width, only that width -% will be used, so that any footnotes stay within the caption's -% width.\NN +% |mincapwidth=...| & sets the minimum width of the float. Without +% this option, the width is set to that of the +% tabular, and the caption and footnotes are +% typeset within that width. This may be a +% problem with very narrow tables; |mincapwidth| +% can then be used to give the float a minimum +% width. The tabular will be centered in it.\NN[1ex] % -% |pos=...| & float position, default: |tbp|.\NN +% |pos=...| & float position, default: |tbp|.\NN[1ex] % -% |label=...| & for |\label|\NN +% |label=...| & for |\label|\NN[1ex] % -% |width=...| & tabularx will be used to typeset the table at the +% |width=...| & \REF{tabularx} will be used to typeset the table at the % specified width\,---\,one or more |X| column -% specifiers must be provided.\NN +% specifiers must be provided.\NN[1ex] % -% \end{tabularx} -% \\[2ex] -% \begin{tabularx}{\hsize}{@{}lX@{}} % |maxwidth=...| & like the \textsl{width} option, but any |X| column % specifiers will be replaced with |l| if the resulting % table width would thus stay within the specified % maximum width. This is especially useful where the -% \LaTeX\ source is generated by a script.\NN +% \LaTeX\ source is generated by a script.\NN[1ex] % % |center| & center the table in the available text width; this is -% the default.\NN +% the default.\NN[1ex] % -% |left| & left align the table in the available text width.\NN +% |left| & left align the table in the available text width.\NN[1ex] % -% |right| & right align the table in the available text width.\NN +% |right| & right align the table in the available text width.\NN[1ex] % -% |figure| & produce a figure float instead of a table float.\NN +% |figure| & produce a figure float instead of a table float.\NN[1ex] % % |botcap| & put the caption at the bottom of the float instead -% of on top of it.\NN +% of on top of it.\NN[1ex] % % |sideways| & rotate table or figure by 90 degrees anticlockwise % and put it on a separate page. With the twoside option % for the standard \LaTeX\ document classes, rotation % will be -90 on even pages. If you use this option, -% the |pos| option is not allowed.\NN +% the |pos| option is not allowed.\NN[1ex] % % |star| & use the starred versions of the |table| and |figure| % environments, which place the float over two columns % when the |twocolumn| option or the |\twocolumn| -% command is active.\NN +% command is active.\NN[1ex] % % |nosuper| & in the footnote table, typeset footnote markers on -% the line, instead of superscripted.\NN +% the line, instead of superscripted.\NN[1ex] % % |framerule=...|& draw a frame around the table with the given rule % thickness. The default is |0pt|, so that no frame -% will be seen.\NN +% will be seen.\NN[1ex] % % |framesep=...| & set the distance between the frame and the table -% to the given dimension. The default is |0pt|.\NN +% to the given dimension. The default is |0pt|.\NN[1ex] % % |framefg=|\sl r g b & set the foreground color of the frame (the % rule color) to the given triplet of % \textsl{rgb}-values. The values should be numbers -% between 0 and 1. The default is |0 0 0| (black).\NN +% between 0 and 1. The default is |0 0 0| (black).\NN[1ex] % % |framebg=|\sl r g b & set the background color of the frame (the % color inside the frame) to the given triplet of % \textsl{rgb}-values. The values should be numbers -% between 0 and 1. The default is |1 1 1| (white).\NN +% between 0 and 1. The default is |1 1 1| (white).\NN[1ex] % \end{tabularx} % \\[2ex] % The footnotes are placed under the table, without a rule. @@ -247,46 +299,76 @@ % The label is optional, the default label is a single $a$. % \par % The newline generating commands are a combination of -% |\tabularnewline| and zero or one of |booktabs|' |\toprule|, +% |\tabularnewline| and zero or one of \REF{booktabs} |\toprule|, % |\midrule| or |\bottomrule|. These combinations have been made, and % short names have been defined, because source texts for complex % tables often become very crowded: % \par % \DescribeMacro{\NN} Normal Newline, generates just a normal new line. % An optional dimen parameter inserts extra vertical space under the -% line\\ +% line. +% \par % \DescribeMacro{\FL} First Line, generates a new line and a thick % rule with some extra space under it. -% An optional dimen parameter sets the line width; the default is 0.08em \\ +% An optional dimen parameter sets the line width; the default is 0.08em. +% \par % \DescribeMacro{\ML} Middle Line: generates a new line and a thin % rule with some extra space over and under it. -% An optional dimen parameter sets the line width; the default is 0.05em \\ +% An optional dimen parameter sets the line width; the default is 0.05em. +% \par % \DescribeMacro{\LL} Last Line: generates a new line and a thick % rule with some extra space over it. -% An optional dimen parameter sets the line width; the default is 0.08em \\ +% An optional dimen parameter sets the line width; the default is 0.08em. +% \par % These macros can be used outside |\ctable| constructs. % \par -% Finally, for completeness, here are some of |booktabs|' commands -% that may be useful:\\ +% Finally, for completeness, here are some of \REF{booktabs}' commands +% that may be useful: +% \par % \DescribeMacro{\toprule} |\toprule[<wd>]| -% where |<wd>| is the optional thinkness of the rule\\ -% \DescribeMacro{\midrule} |\midrule[<wd>]|\\ -% \DescribeMacro{\bottomrule} |\bottomrule[<wd>]|\\ +% where |<wd>| is the optional thinkness of the rule. +% \par +% \DescribeMacro{\midrule} |\midrule[<wd>]|. +% \par +% \DescribeMacro{\bottomrule} |\bottomrule[<wd>]|. +% \par % \DescribeMacro{\cmidrule} |\cmidrule[<wd>](<trim>){a-b}| % where |<trim>| can be |r|, |l|, or |rl| -% and the rule is drawn over columns |a| through |b|\\ +% and the rule is drawn over columns |a| through |b|. +% \par % \DescribeMacro{\morecmidrules} |\morecmidrules| -% must be used to separate two successive cmidrules\\ +% must be used to separate two successive cmidrules. +% \par % \DescribeMacro{\addlinespace} |\addlinespace[<wd>]| -% inserts extra space between rows\\ +% inserts extra space between rows. +% \par % \DescribeMacro{\specialrule} -% |\specialrule{<wd>}{<abovespace>}{<belowspace>}|\\ -% See the |booktabs| documentation for details. +% |\specialrule{<wd>}{<abovespace>}{<belowspace>}|. +% \par +% See the \REF{booktabs} documentation for details. +% +% \subsection{The width and maxwidth options} +% When \LaTeX-sources containing tables are generated automatically by a +% script, it is often not known in advance what the maximum size of an +% |l|~column will be. A good solution for this is to use an |X|~specifier, +% typesetteing the table at the text width with the \REF{tabularx} package. +% However, this will result in too much white space in cases where the +% column contains small texts only. This problem can be solved by using +% the maxwidth option instead of the width option. The |X|~specifiers will +% then be replaced with |l| as long as the width of the resulting table +% stays with the specified maximum width. +% +% \section{Examples} +% Table~\ref{nowidth} is an example taken from the related package +% \REF{threeparttable} by Donald Arseneau, with an extra footnote. +% It was typeset with: +% \color{vbgreen} +% \begin{verbatim} % \ctable[ % cap = The Skewing Angles, % caption = The Skewing Angles ($\beta$) for % $\fam0 Mu(H)+X_2$ and $\fam0 Mu(H)+HX$~\tmark, -% label = tab:nowidth, +% label = nowidth, % ]{rlcc}{ % \tnote{for the abstraction reaction, % $\fam0 Mu+HX \rightarrow MuH+X$.} @@ -299,30 +381,13 @@ % &$\beta$(H) & $80.9^\circ$\tmark[b] & $83.2^\circ$ \NN % &$\beta$(Mu) & $86.7^\circ$ & $87.7^\circ$ \LL % } -% -% \subsection{The width and maxwidth options} -% When \LaTeX-sources containing tables are generated automatically by a -% script, it is often not known in advance what the maximum size of an l -% column will be. A good solution for this is to use an |X| specifier, -% typesetteing the table at the text width with the tabularx package. -% However, this will result in too much white space in cases where the -% column contains small texts only. This problem can be solved by using -% the maxwidth option instead of the width option. The |X| specifiers will -% then be replaced with |l| as long as the width of the resulting table -% stays with the specified maximum width. -% -% -% \section{Examples} -% \subsection{Tables} -% Table~\ref{tab:nowidth} is an example taken from the related package -% threeparttable.sty by Donald Arseneau, with an extra footnote. -% It was typeset with: -% \begin{verbatim} +% \end{verbatim} +% \color{black} % \ctable[ % cap = The Skewing Angles, % caption = The Skewing Angles ($\beta$) for % $\fam0 Mu(H)+X_2$ and $\fam0 Mu(H)+HX$~\tmark, -% label = tab:nowidth, +% label = nowidth, % ]{rlcc}{ % \tnote{for the abstraction reaction, % $\fam0 Mu+HX \rightarrow MuH+X$.} @@ -335,12 +400,19 @@ % &$\beta$(H) & $80.9^\circ$\tmark[b] & $83.2^\circ$ \NN % &$\beta$(Mu) & $86.7^\circ$ & $87.7^\circ$ \LL % } -% \end{verbatim} +% Table~\ref{width} is an example with a width specification, +% taken from the \REF{tabularx} documentation, with the vertical rules +% removed. +% By using the trimming parameters of the \REF{booktabs} |\cmidrule| +% command, some of the horizontal splitting was regained. +% The |left| option left aligns the table. It was typeset with: +% \color{vbgreen} +% \begin{verbatim} % \ctable[ % caption = Example with a specified width of 100mm, +% label = width, % width = 100mm, -% pos = b, -% label = tab:width, +% pos = h, % left % ]{c>{\raggedright}Xc>{\raggedright}X}{ % \tnote{footnotes are placed under the table} @@ -355,19 +427,13 @@ % Column four will act in the same way as % column two, with the same width. \LL % } -% -% Table~\ref{tab:width} is an example with a width specification, -% taken from the |tabularx| documentation, with the vertical rules -% removed. By using the trimming parameters of the |\LR|, |\MR|, and -% |\RR| commands of the |booktabs| package, some of the horizontal -% splitting was regained. By using the |left| option, the table has -% been left aligned. It was typeset with: -% \begin{verbatim} +% \end{verbatim} +% \color{black} % \ctable[ % caption = Example with a specified width of 100mm, +% label = width, % width = 100mm, -% pos = b, -% label = tab:width, +% pos = h, % left % ]{c>{\raggedright}Xc>{\raggedright}X}{ % \tnote{footnotes are placed under the table} @@ -382,24 +448,26 @@ % Column four will act in the same way as % column two, with the same width. \LL % } -% \end{verbatim} % -% \subsection{Figures} % Figures, even single ones, are always put in tabular cells. This is not % particularly handy for single pictures, but it eases the construction % of arrays of pictures, including sub-captions, delineation, and spacing. % Figure~\ref{fig} shows a figure that has been produced with the |\ctable| -% command, in combination with |\usepackage{carom}|; +% command, in combination with +% |\usepackage|\{% +% \href{http://tug.ctan.org/obsolete/macros/latex/contrib/xymtex/carom.sty}{\texttt{carom}}\} % it has been typeset with: +% \color{vbgreen} % \begin{verbatim} % \ctable[ +% figure, +% botcap, +% pos = h, % caption = The di- and tri-bromobenzenes, % label = fig, -% botcap, % framebg = .53 .81 .92, % framerule = 1pt, % framesep = 4ex, -% figure, % ]{ccc}{}{ \NN % \bzdrv{1==Br;2==Br}& % \bzdrv{1==Br;3==Br}& @@ -411,14 +479,16 @@ % 1,2,3 & 1,2,4 & 1,3,5 % } % \end{verbatim} +% \color{black} % \ctable[ +% figure, +% botcap, +% pos = h, % caption = The di- and tri-bromobenzenes, % label = fig, -% botcap, % framebg = .53 .81 .92, % framerule = 1pt, % framesep = 4ex, -% figure, % ]{ccc}{}{ \NN % \bzdrv{1==Br;2==Br}& % \bzdrv{1==Br;3==Br}& @@ -430,13 +500,128 @@ % 1,2,3 & 1,2,4 & 1,3,5 % } % (The excessive whitespace at the left of the figure is caused by -% the bounding boxes generated by the \textsl{carom} package.) +% the bounding boxes generated by the |carom| package.) +% +% \section{Option examples} +% In the following, small examples will be shown illustrating the effect of +% options. In the left column the relevant part of the source is shown, in the +% right column you see the result. In most cases you see a standard example on a +% light yellow background, followed by one or more variations on a light blue +% background. Where necessary, the example will show boxes to indicate the page +% and the text body. +% +% \newpage +% \subsection{\ttfamily\bfseries center, left, right} +% These options align the float in the page; the default is |center|: +% \medskip\\ +% \ROW{Y}{s02k}{02k} +% \ROW{B}{s02l}{02l} +% \ROW{B}{s02m}{02m} +% +% \subsection{\ttfamily\bfseries nosuper} +% Footnote markers in |ctable| are typeset superscripted by default. Use the +% |nosuper| option to place them on the base line: +% \medskip\\ +% \ROW{Y}{s07a}{07a} +% \ROW{B}{s07b}{07b} +% +% \newpage +% \subsection{\ttfamily\bfseries mincapwidth} +% |ctable| forces caption and footnotes to stay within the width of the table. +% Sometimes, however, tables are so narrow, that this is not really what you want. +% In such cases, use the |mincapwidth| option to give caption and footnotes some +% extra room: +% \medskip\\ +% \ROW{Y}{s05a}{05a} +% \ROW{B}{s05b}{05b} +% \medskip +% You can set |mincapwidth| to a large value, say |\hsize|, if you want a one-line +% caption. Note, however, that this may influence the horizontal positioning of +% the table: values larger than |\hsize| will move a centered table out of the +% center, a value of |\hsize| will prevent the |left| and |right| options to do +% their work, because the table is already captured between the left and right +% margins. +% +% \subsection{\ttfamily\bfseries maxwidth} +% When \LaTeX-sources containing tables are generated automatically by a +% script, it is often not known in advance what the maximum size of an |l| +% column will be. A good solution for this is to use an |X| specifier, +% typesetting the table at the text width with the \REF{tabularx} package. +% However, this will result in too much white space in cases where the +% column contains small texts only. This problem can be solved by using +% the maxwidth option instead of the width option. The |X| specifiers will +% then be replaced with |l| as long as the width of the resulting table +% stays with the specified maximum width. +% \medskip\\ +% \ROW{Y}{s06a}{06a} +% \ROW{B}{s06b}{06b} +% +% \newpage +% \subsection{\ttfamily\bfseries framerule} +% The following examples show the use of frames and backgrounds. Every table +% is typeset by |ctable| with a frame around it, but the frame is, by default, +% drawn with a zero width line, and is therefore invisible. You can make it +% visible by either changing the linewidth to a positive value or by giving it a +% background color, which will be used to fill the frame. +% +% Here is a simple table without a frame, followed by one with a red, |1pt| thick +% frame: +% \medskip\\ +% \ROW{Y}{s08a}{08a} +% \ROW{B}{s08b}{08b} +% \medskip +% As you see, the frame fits closely to the first (|\FL|) and last (|\LL|) table +% lines. This can be a reason to either remove those lines, or to introduce some +% whitespace between the frame and the table with the |framesep| option: +% \medskip\\ +% \ROW{B}{s09b}{09b} +% \medskip +% And finally, we could also frame the table by giving it a, say, yellow backgound +% instead of a red frame line, or even do both: +% \medskip\\ +% \ROW{Y}{s10a}{10a} +% \ROW{B}{s10b}{10b} +% +% \newpage +% \subsection{\ttfamily\bfseries captionskip} +% The distance between a top caption and the table is \texttt{2ex}, +% but it can be varied with \texttt{captionskip}: +% \medskip\\ +% \ROW{Y}{s03a}{03a} +% \ROW{B}{s03b}{03b} +% \medskip +% This works for bottom caption, too: +% \medskip\\ +% \ROW{Y}{s04a}{04a} +% \ROW{B}{s04b}{04b} +% +% \subsection{\ttfamily\bfseries figure, botcap} +% By default, |ctable| generates a table float, but with the |figure| option, a +% figure float is generated instead. The caption stays on top, so if you are +% accustomed to have bottom caption for your figures, you will probably also need +% the |botcap| option: +% \medskip\\ +% \ROW{Y}{s01a}{01a} +% \ROW{B}{s01b}{01b} +% +% \newpage +% \subsection{\ttfamily\bfseries sideways} +% The |sideways| option creates a landscape table with its head pointing at the +% spine\,---\,when the documentclass' twoside option has been used, that is. The +% following examples show the effect of the |sideways| option, first on page one, +% then on page 2. Note that the |caption| option has not been used, so no caption +% appears: +% \medskip\\ +% \ROW{Y}{s11k}{11k} +% \ROW{B}{s11l}{11l} +% \ROW{B}{s11m}{11m} +% +% \newpage % \StopEventually{} % % \section{Implementation} -% \parskip2ex % \begin{macrocode} -\RequirePackage{xspace,color,xkeyval,array,tabularx,booktabs,rotating} +\RequirePackage{xspace,color,xkeyval,array,tabularx,booktabs,rotating,caption} \def\NN{\tabularnewline} \def\FL{\toprule} \def\ML{\NN\midrule} @@ -452,16 +637,14 @@ \newdimen\@ctblmaxwidth \newdimen\@ctblmincapwidth \newdimen\@ctblw % the final width -\newdimen\@ctblww +\newdimen\@ctblfloatwidth \newdimen\@ctbloldsep \newdimen\@ctbloldrule % \end{macrocode} % Allocate box registers so that we can determine the widths of the % tables % \begin{macrocode} -\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 +\newbox\ctbl@t % tabular saved and measured here % \end{macrocode} % Option setting commands from keyval. The table position (here, top, % bottom, page) gets a special treatment, since \LaTeX\ does not expand @@ -469,30 +652,30 @@ % command like |\@ctblbegin| we put % |\begin{table}[tbp]| in it. % \begin{macrocode} -\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}{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}{% +\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}{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}[]{\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}% -\define@key{ctbl}{nosuper}[]{\let\@cttextsuperscript\@ctcopy}% + } +\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} +\define@key{ctbl}{nosuper}[]{\let\@cttextsuperscript\@ctcopy} % \end{macrocode} % a caption will only be generated if the \textsl{caption} option was used: % \begin{macrocode} @@ -510,29 +693,29 @@ \newcommand{\tnote}[2][a]{% \hbox{\@cttextsuperscript{\normalfont\textit{#1}}}\NN} \newcommand{\tmark}[1][a]{% - \hbox{\@cttextsuperscript{\normalfont\textit{#1\xspace}}}} + \hbox{\textsuperscript{\normalfont\textit{#1\xspace}}}} \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}% + \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 + \@ctblcaptionskip0ex \@ctblframesep0pt \@ctblwidth=0pt \@ctblmaxwidth=0pt \@ctblmincapwidth=0pt - \setkeys{ctbl}{#1}% + \setkeys{ctbl}{#1} % \end{macrocode} % It makes no sense to use \textsl{width} together with \textsl{maxwidth} or % \textsl{pos} together with \textsl{sideways} @@ -540,106 +723,100 @@ \ifdim\@ctblwidth=0pt\else \ifdim\@ctblmaxwidth=0pt\else \PackageError{ctable}{ - You may not use the width and maxwidth options together}{% + You may not use the width and maxwidth options together}{ Use either width or maxwidth} \fi \fi \ifx\@ctblpos\empty\else \ifx\@ctblsideways\empty\else \PackageError{ctable}{ - You may not use the pos and sideways 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 +% \end{macrocode} +% It makes no sense to label a captionless table, because the label can't +% be placed, leaving the user wondering why references to the table get a ?? +% \begin{macrocode} + \ifx\@ctblcaption\empty + \ifx\@ctbllabel\empty\else + \PackageError{ctable}{ + You may not label a captionless table}{ + Such a label can't be referenced} + \fi + \fi \newcolumntype{Y}{X}% save the X type % \end{macrocode} -% save the table contents in a box, so we can determine its width, one box -% will contain the table typeset with the tabular environment: +% save the table contents in a box, so we can determine its width, +% initially, save the table typeset with the tabular environment: % \begin{macrocode} - \sbox\ctbl@tabel{% + \sbox\ctbl@t{% \newcolumntype{X}{l}% temporarily make type X = l \@ctblframe{@ctblframefg}{@ctblframebg}{% \begin{tabular}{#2} - #4 + #4% \end{tabular}% }% }% % \end{macrocode} -% the other will get the table typeset with the tabularx environment: -% \begin{macrocode} - \sbox\ctbl@tabelx{% - \newcolumntype{X}{Y}% restore X - \@ctblframe{@ctblframefg}{@ctblframebg}{% - \begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2} - #4 - \end{tabularx}% - }% - }% -% \end{macrocode} -% if no \textsl{maxwidth} was given: +% then look if we'll need the tabularx environment: % \begin{macrocode} + \newif\if@ctblusex\@ctblusexfalse \ifdim\@ctblmaxwidth=0pt -% \end{macrocode} -% and also no \textsl{width}: -% \begin{macrocode} \ifdim\@ctblwidth=0pt -% \end{macrocode} -% then use the tabular environment: -% \begin{macrocode} - \sbox{\ctbl@t}{\usebox\ctbl@tabel}% \else -% \end{macrocode} -% if width was given: use the tabularx environment -% \begin{macrocode} - \sbox{\ctbl@t}{\usebox\ctbl@tabelx}% + \@ctblusextrue \fi \else -% \end{macrocode} -% with the \textsl{maxwidth} option, we check if the table, typeset with -% the tabular environment would get too wide: -% \begin{macrocode} - \ifdim\wd\ctbl@tabel>\@ctblmaxwidth -% \end{macrocode} -% if so, we use the tabularx environment: -% \begin{macrocode} - \sbox{\ctbl@t}{\usebox\ctbl@tabelx}% - \else -% \end{macrocode} -% but if within limits, we use the tabular environment: -% \begin{macrocode} - \sbox{\ctbl@t}{\usebox\ctbl@tabel}% + \ifdim\wd\ctbl@t>\@ctblmaxwidth + \@ctblusextrue \fi \fi +% +% if so, replace tabular with tabularx: +% + \if@ctblusex + \sbox\ctbl@t{% + \newcolumntype{X}{Y}% restore X + \@ctblframe{@ctblframefg}{@ctblframebg}{% + \begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2} + #4% + \end{tabularx}% + }% + }% + \fi % \end{macrocode} % the |ctbl@t| box now contains the table as we want to typeset it; % determine its width: % \begin{macrocode} \@ctblw=\wd\ctbl@t % \end{macrocode} -% If mincapwidth was set wider than the table, -% make only as wide as needed for the caption so that any footnotes -% stay within the caption width +% Now find the width of the float, |\@ctblfloatwidth|; everything in it will +% be centered within that width. +% Normally we'll use the width of the table, |\@ctblw|, but if the +% mincapwidth, |\@ctblmincapwidth| was set wider than the table, that will be used: % \begin{macrocode} - \ifdim\@ctblmincapwidth<\@ctblw\@ctblww=\@ctblw\else% - \settowidth{\@ctblww}{\tablename\ \thetable: \@ctblcaption} - \ifdim\@ctblww>\@ctblmincapwidth\@ctblww=\@ctblmincapwidth\fi% + \@ctblfloatwidth=\ifdim\@ctblmincapwidth>\@ctblw + \@ctblmincapwidth + \else + \@ctblw \fi % \end{macrocode} % |\@ctblbegin| is now defined as something like |\begin{table}[tbp]|. % \begin{macrocode} \@ctblbegin \begin{\@ctblalign} - \begin{minipage}{\@ctblww} - \ifx\@ctblbotcap\empty\@ctblCaption\vspace{\@ctblcaptionskip}\fi + \begin{minipage}{\@ctblfloatwidth}\parindent0pt + \ifx\@ctblbotcap\empty\@ctblCaption\vskip\@ctblcaptionskip\fi \centering{\usebox\ctbl@t} % insert the tabular - \def\@ctblfootnotes{#3} + \def\@ctblfootnotes{#3}% \ifx#3\empty\else % append footnotes, if any \\ \begin{tabularx}{\hsize}{r@{\,}>{\footnotesize\raggedright}X} - #3 - \end{tabularx} + #3% + \end{tabularx}% \fi - \ifx\@ctblbotcap\empty\else\@ctblCaption\fi + \ifx\@ctblbotcap\empty\else\vskip\@ctblcaptionskip\@ctblCaption\fi \end{minipage} \end{\@ctblalign} \@ctblend @@ -647,4 +824,4 @@ % \end{macrocode} % \Finale \endinput -$Id: ctable.dtx,v 1.41 2007/03/04 16:06:51 wybo Exp $ +$Id: ctable.dtx,v 1.49 2007/08/13 20:30:15 wybo Exp $ diff --git a/Master/texmf-dist/source/latex/ctable/ctable.ins b/Master/texmf-dist/source/latex/ctable/ctable.ins index 10e903d6035..adea4bba77a 100644 --- a/Master/texmf-dist/source/latex/ctable/ctable.ins +++ b/Master/texmf-dist/source/latex/ctable/ctable.ins @@ -5,9 +5,9 @@ %% 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: -%% +%% %% http://www.latex-project.org/lppl.txt -%% +%% %% and version 1.2 or later is part of all distributions of LaTeX version %% 1999/12/01 or later. %% @@ -45,17 +45,20 @@ and version 1.2 or later is part of all distributions of LaTeX version \Msg{* *} \Msg{* ctable.sty *} \Msg{* *} -\Msg{* To produce the documentation run the file ctable.dtx *} -\Msg{* through LaTeX: *} +\Msg{* To produce the documentation: *} +\Msg{* 1. generate the graphics needed by running doit in doc *} +\Msg{* 2. run the file ctable.dtx through LaTeX: *} \Msg{* *} -\Msg{* pdflatex --interaction=batchmode $NAME > /dev/null *} -\Msg{* makeindex -q -s gglo.ist -o ctable.gls ctable.glo *} -\Msg{* makeindex -q -s gind.ist -o ctable.ind ctable.idx *} -\Msg{* pdflatex --interaction=batchmode $NAME > /dev/null *} +\Msg{* pdflatex --interaction=batchmode $NAME > /dev/null *} +\Msg{* makeindex -q -s gglo.ist -o ctable.gls ctable.glo *} +\Msg{* makeindex -q -s gind.ist -o ctable.ind ctable.idx *} +\Msg{* pdflatex --interaction=batchmode $NAME > /dev/null *} +\Msg{* (or maybe adapt the inst script to do that and *} +\Msg{* install everything at the same time) *} \Msg{* *} \Msg{* Happy TeXing! *} \Msg{* *} \Msg{*************************************************************} \endbatchfile -$Id: ctable.ins,v 1.4 2006/04/10 21:26:08 wybo Exp $ +$Id: ctable.ins,v 1.5 2007/07/22 13:47:51 wybo Exp $ diff --git a/Master/texmf-dist/tex/latex/ctable/ctable.sty b/Master/texmf-dist/tex/latex/ctable/ctable.sty index 8fa817c192c..ea8ef580d31 100644 --- a/Master/texmf-dist/tex/latex/ctable/ctable.sty +++ b/Master/texmf-dist/tex/latex/ctable/ctable.sty @@ -20,11 +20,10 @@ %% 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} - [2007/03/04 v1.9 ctable package] -\RequirePackage{xspace,color,xkeyval,array,tabularx,booktabs,rotating} + [2007/08/17 v1.10 ctable package] +\RequirePackage{xspace,color,xkeyval,array,tabularx,booktabs,rotating,caption} \def\NN{\tabularnewline} \def\FL{\toprule} \def\ML{\NN\midrule} @@ -40,36 +39,34 @@ \newdimen\@ctblmaxwidth \newdimen\@ctblmincapwidth \newdimen\@ctblw % the final width -\newdimen\@ctblww +\newdimen\@ctblfloatwidth \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 -\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}{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}{% +\newbox\ctbl@t % tabular saved and measured here +\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}{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}[]{\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}% -\define@key{ctbl}{nosuper}[]{\let\@cttextsuperscript\@ctcopy}% + } +\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} +\define@key{ctbl}{nosuper}[]{\let\@cttextsuperscript\@ctcopy} \def\@ctblCaption{ \ifx\@ctblcap\empty\let\@ctblcap\@ctblcaption\fi \ifx\@ctblcaption\empty\else @@ -84,91 +81,99 @@ \newcommand{\tnote}[2][a]{% \hbox{\@cttextsuperscript{\normalfont\textit{#1}}}\NN} \newcommand{\tmark}[1][a]{% - \hbox{\@cttextsuperscript{\normalfont\textit{#1\xspace}}}} + \hbox{\textsuperscript{\normalfont\textit{#1\xspace}}}} \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}% + \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 + \@ctblcaptionskip0ex \@ctblframesep0pt \@ctblwidth=0pt \@ctblmaxwidth=0pt \@ctblmincapwidth=0pt - \setkeys{ctbl}{#1}% + \setkeys{ctbl}{#1} \ifdim\@ctblwidth=0pt\else \ifdim\@ctblmaxwidth=0pt\else \PackageError{ctable}{ - You may not use the width and maxwidth options together}{% + You may not use the width and maxwidth options together}{ Use either width or maxwidth} \fi \fi \ifx\@ctblpos\empty\else \ifx\@ctblsideways\empty\else \PackageError{ctable}{ - You may not use the pos and sideways 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 + \ifx\@ctblcaption\empty + \ifx\@ctbllabel\empty\else + \PackageError{ctable}{ + You may not label a captionless table}{ + Such a label can't be referenced} + \fi + \fi \newcolumntype{Y}{X}% save the X type - \sbox\ctbl@tabel{% + \sbox\ctbl@t{% \newcolumntype{X}{l}% temporarily make type X = l \@ctblframe{@ctblframefg}{@ctblframebg}{% \begin{tabular}{#2} - #4 + #4% \end{tabular}% }% }% - \sbox\ctbl@tabelx{% - \newcolumntype{X}{Y}% restore X - \@ctblframe{@ctblframefg}{@ctblframebg}{% - \begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2} - #4 - \end{tabularx}% - }% - }% + \newif\if@ctblusex\@ctblusexfalse \ifdim\@ctblmaxwidth=0pt \ifdim\@ctblwidth=0pt - \sbox{\ctbl@t}{\usebox\ctbl@tabel}% \else - \sbox{\ctbl@t}{\usebox\ctbl@tabelx}% + \@ctblusextrue \fi \else - \ifdim\wd\ctbl@tabel>\@ctblmaxwidth - \sbox{\ctbl@t}{\usebox\ctbl@tabelx}% - \else - \sbox{\ctbl@t}{\usebox\ctbl@tabel}% + \ifdim\wd\ctbl@t>\@ctblmaxwidth + \@ctblusextrue \fi \fi + \if@ctblusex + \sbox\ctbl@t{% + \newcolumntype{X}{Y}% restore X + \@ctblframe{@ctblframefg}{@ctblframebg}{% + \begin{tabularx}{\ifdim\@ctblwidth>0pt\@ctblwidth\else\@ctblmaxwidth\fi}{#2} + #4% + \end{tabularx}% + }% + }% + \fi \@ctblw=\wd\ctbl@t - \ifdim\@ctblmincapwidth<\@ctblw\@ctblww=\@ctblw\else% - \settowidth{\@ctblww}{\tablename\ \thetable: \@ctblcaption} - \ifdim\@ctblww>\@ctblmincapwidth\@ctblww=\@ctblmincapwidth\fi% + \@ctblfloatwidth=\ifdim\@ctblmincapwidth>\@ctblw + \@ctblmincapwidth + \else + \@ctblw \fi \@ctblbegin \begin{\@ctblalign} - \begin{minipage}{\@ctblww} - \ifx\@ctblbotcap\empty\@ctblCaption\vspace{\@ctblcaptionskip}\fi + \begin{minipage}{\@ctblfloatwidth}\parindent0pt + \ifx\@ctblbotcap\empty\@ctblCaption\vskip\@ctblcaptionskip\fi \centering{\usebox\ctbl@t} % insert the tabular - \def\@ctblfootnotes{#3} + \def\@ctblfootnotes{#3}% \ifx#3\empty\else % append footnotes, if any \\ \begin{tabularx}{\hsize}{r@{\,}>{\footnotesize\raggedright}X} - #3 - \end{tabularx} + #3% + \end{tabularx}% \fi - \ifx\@ctblbotcap\empty\else\@ctblCaption\fi + \ifx\@ctblbotcap\empty\else\vskip\@ctblcaptionskip\@ctblCaption\fi \end{minipage} \end{\@ctblalign} \@ctblend |