| 1 |
\documentclass[a4paper]{article} |
| 2 |
\usepackage{miscdoc} |
| 3 |
\begin{document} |
| 4 |
\title{The \Package{threeparttable} package\thanks{This documentation |
| 5 |
covers version 3.0 of the package, dated 2006-06-13}} |
| 6 |
\author{Donald Arseneau\thanks{Documentation put together by Robin |
| 7 |
Fairbairns}} |
| 8 |
\maketitle |
| 9 |
|
| 10 |
\section{Outline} |
| 11 |
|
| 12 |
This package facilitates tables with titles (captions) and notes. The |
| 13 |
title and notes are given a width equal to the body of the table (a |
| 14 |
tabular environment). By itself, a \environment{threeparttable} does |
| 15 |
not float, but you can put it in a \environment{table} or a |
| 16 |
\environment{table*} or some other floating environment. (This causes |
| 17 |
extra typing, but gives more flexibility.) |
| 18 |
|
| 19 |
Inside a \environment{threeparttable} there should be a caption, |
| 20 |
followed by a tabular environment (\environment{tabular}, |
| 21 |
\environment{tabular*}, \environment{tabularx} or the like), possibly |
| 22 |
followed by a series of itemized \emph{tablenotes}. (The caption may |
| 23 |
also go after the tabular environment.) |
| 24 |
|
| 25 |
For example: |
| 26 |
\begin{quote} |
| 27 |
\begin{verbatim} |
| 28 |
\begin{table} |
| 29 |
\begin{threeparttable}[b] |
| 30 |
\caption{...} |
| 31 |
\begin{tabular}...% or {tabular*} |
| 32 |
...42\tnote{1}&.... ... |
| 33 |
\end{tabular} |
| 34 |
\begin{tablenotes} |
| 35 |
\item [1] the first note ... |
| 36 |
\end{tablenotes} |
| 37 |
\end{threeparttable} |
| 38 |
\end{table} |
| 39 |
\end{verbatim} |
| 40 |
\end{quote} |
| 41 |
|
| 42 |
The {threeparttable} environment takes an optional vertical-placement |
| 43 |
parameter, \option[t], \option[b], or \option[c]; the default is |
| 44 |
\option[t]. |
| 45 |
|
| 46 |
There is nothing automatic about the notes; you must specify the |
| 47 |
identifier in the body of the table (``\cmdinvoke{tnote}{a}'') and in |
| 48 |
the notes below the table (``\cmdinvoke{item}[a]\texttt{...}''). The |
| 49 |
author chose this method because automatic numbering with \cs{footnote} would be very hard to use, particularly because many tables make |
| 50 |
repeated reference to a single note\footnote{If someone has a |
| 51 |
convenient, elegant, automatic system, the author promises to |
| 52 |
listen!}. \cs{tnote} commands may be given in the caption too, and |
| 53 |
they will \textbf{not} appear in the list of tables. |
| 54 |
|
| 55 |
There are several commands which should be redefined for customizing the |
| 56 |
behaviour of \Package{threeparttable}, especially the table notes. |
| 57 |
Some options are provided for common variations of the table notes: |
| 58 |
\begin{description} |
| 59 |
\item[\option{para}] Notes come one-after-another without line breaks |
| 60 |
\item[\option{flushleft}] No hanging indentation on notes |
| 61 |
\item[\option{online}] \cs{item} tag is printed normal size, not superscript |
| 62 |
\item[\option{normal}] restores default formatting |
| 63 |
\end{description} |
| 64 |
These options can be given to the \cs{usepackage} command or to each |
| 65 |
individual \environment{tablenotes} environment. The |
| 66 |
\option[normal] option is intended to reverse the whole-document |
| 67 |
options for a particular table; e.g. |
| 68 |
\begin{quote} |
| 69 |
\begin{verbatim} |
| 70 |
\usepackage[para]{threeparttable} |
| 71 |
... document rambles on ... |
| 72 |
\begin{tablenotes}[normal,flushleft] |
| 73 |
\end{verbatim} |
| 74 |
\end{quote} |
| 75 |
These few options will not give you every format you might want, so |
| 76 |
you may find that you need to redefine one or more of the |
| 77 |
configuration commands. Note that mixing options with redefinitions |
| 78 |
is unlikely to work smoothly: Please submit your redefinitions to be |
| 79 |
used as options in future versions! |
| 80 |
|
| 81 |
Configuration commands: |
| 82 |
\begin{itemize} |
| 83 |
\item \cs{TPTminimum}: command givining minimum caption width. |
| 84 |
Default \texttt{4em}; change with \cs{def} or \cs{renewcommand}. |
| 85 |
\item \cs{TPTrlap}: A command with one argument, to make notes go out |
| 86 |
of the column, into the column separation (for right-aligning) |
| 87 |
\item \cs{TPTtagStyle}: Command with one argument to set appearance of |
| 88 |
the tag (number) in \cmdinvoke{tnote}{tag}. It defaults to nil. It |
| 89 |
could be \cs{textit}. |
| 90 |
\item \cs{tnote}: Yes, you can redefine the \cs{tnote} command. |
| 91 |
\item \cs{TPTnoteLabel}: Command with one argument to format the item |
| 92 |
label in the tablenotes list (\cs{makelabel}); default uses |
| 93 |
\cs{tnote}. |
| 94 |
\item \cs{TPTnoteSettings}: A command to issue all the |
| 95 |
list-environment setup commands for the tablenotes. |
| 96 |
\item \cs{tablenotes} or \cs{TPTdoTablenotes}: Yes, you can redefine |
| 97 |
the whole tablenotes environment. (\cs{tablenotes} processes |
| 98 |
optional parameters, then invokes \cs{TPTdoTablenotes}; the |
| 99 |
\option[para] option replaces \cs{TPTdoTablenotes}). |
| 100 |
\end{itemize} |
| 101 |
For figures, there is an equivalent \environment{measuredfigure} |
| 102 |
environment. It is fairly fragile though, and should be used only for |
| 103 |
a single graphic above a single caption. |
| 104 |
|
| 105 |
Note that the \cs{caption} formatting is \emph{not} adjusted by |
| 106 |
\Package{threeparttable}. You should use one of the caption-control |
| 107 |
packages to get captions that work well as table titles. In truth, |
| 108 |
\Package{threeparttable} sets \cs{abovecaptionskip} to zero for |
| 109 |
captions above the table, but more complete changes are called for. |
| 110 |
\end{document} |