% threeparttable.sty   (or 3parttable) (or 3parttab on DOS)
% by Donald Arseneau   Updated on Jul 13, 1994.
% 
% This package facilitates tables with titles (captions) and notes. The
% title and notes are given a width equal to the body of the table (a
% tabular environment).  By itself, a threeparttable does not float, but
% you can put it in a {table} or a {table*} or some other environment.
% (This causes extra typing, but gives more flexibility.)
%
% Inside a threeparttable there should be a caption, followed by a tabular
% environment, possibly followed by a series of itemized "tablenotes".  At
% present, there is nothing automatic about the notes; you must specify the
% identifier in the body of the table ("\tnote{a}") and in the notes below
% ("\item[a]...").  I chose this method because automatic numbering with
% \footnote would be very hard to use, particularly because many tables
% make repeated reference to a single note.  If someone has a suggestion
% for a convenient, elegant, automatic system, I'll listen!  \tnote
% commands can be given in the caption too, and they will *NOT* appear in
% the list of tables. 
% 
% \begin{table}
%  \begin{threeparttable}
%   \caption{...}
%   \begin{tabular}...% or {tabular*}
%    ...\tnote{1}&....
%    ...
%   \end{tabular}
%   \begin{tablenotes}
%    \item [1] the first note
%    ...
%   \end{tablenotes}
%  \end{threeparttable}
% \end{table}

\expandafter\edef\csname TPT@catcodes\endcsname
  {\catcode`\string @=\the\catcode`\@\catcode`\string *=\the\catcode`\*}
\catcode`\@=11
\catcode`\*=11

\@ifundefined{@tempboxb}{\@nameuse{newbox}\@tempboxb}{}

\def\threeparttable{% 3 parts: title, tabular environment, notes
\vbox\bgroup\sloppy
\def\@captype{table}%
\topsep\z@
\@enumdepth\z@
\let\@caption\TPT@caption
\let\TPT@LA@tabular\tabular \let\TPT@LA@tabular*\tabular*
\def\tabular{\everyhbox{\aftergroup\TPT@endtab \let\TPTrlap\rlap 
  \everyhbox{}}\TPT@LA@tabular}%
\def\tabular*{\everyhbox{\aftergroup\TPT@endtab \let\TPTrlap\rlap 
  \everyhbox{}}\TPT@LA@tabular*}%
\let\TPTrlap\relax
}%

\def\endthreeparttable{\egroup\global\@ignoretrue}

\def\TPT@endtab{\everyhbox{}%
\setbox\@tempboxb\lastbox   % grab tabular environment and measure it
\xdef\TPT@hsize{\hsize\the\wd\@tempboxb \linewidth\hsize}\TPT@hsize
\@parboxrestore
\ifx\TPT@docapt\@undefined\else
  \TPT@docapt \global\let\TPT@docapt\@undefined \vskip.2\baselineskip
\fi \par \box\@tempboxb \parindent=1em\relax}

\gdef\TPT@hsize{}

\def\TPT@caption#1[#2]#3{\gdef\TPT@docapt{\TPT@LA@caption
   {#1}[#2]{#3}}\ignorespaces}

\def\tablenotes{\TPT@hsize\list{}{\topsep.1\baselineskip \partopsep\z@
\itemsep.1\baselineskip \parsep\z@ \itemindent 1.5em\leftmargin\itemindent
\labelwidth 1em\labelsep .5em\relax}}

\def\tnote#1{\protect\TPTrlap{$^{\fam\z@ #1}$}}% 
\def\TPTrlap#1{} % notes in caption will disappear in list of tables!

\let\endtablenotes\endlist
\let\TPT@LA@caption\@caption

\TPT@catcodes % restore catcode of @ and * to starting value

\endinput

Example:

Here is some paragraph before the table.  Note that this table does not
float because it is not in a {table} or {table*} environment.

\begin{center}
\begin{threeparttable}
\caption{The Skewing Angles ($\beta$) for $\fam0 Mu(H)+X_2$ and
   $\fam0 Mu(H)+HX$~\tnote{a}}
\begin{tabular}{rlcc}
\hline
&   & $\fam0 H(Mu)+F_2$ & $\fam0 H(Mu)+Cl_2$ \\
\hline
&$\beta$(H)  & $80.9^\circ\tnote{b}$ & $83.2^\circ$ \\
&$\beta$(Mu) & $86.7^\circ$ & $87.7^\circ$ \\
\hline
\end{tabular}
\begin{tablenotes}
\item[a] for the abstraction reaction, $\fam0 Mu+HX \rightarrow MuH+X$.
\item[b] 1 degree${} = \pi/180$ radians.
\end{tablenotes}
\end{threeparttable}

\end{center}
