% -*- Mode: TeX -*-
%% Definitions of table-related macros

\def\displaytwo #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\cr
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}                                       
}}
\caption{#1}
\endfig        
\goodbreak
}

\def\displaythree #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}

\def\displayfour #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}

\def\displayfive #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\tabskip \dimen0 plus 1fil&
\misc{##}\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}


\def\showtwo #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\cr
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}                                       
}}
\caption{#1}
\endfig        
\goodbreak
}

\def\showthree #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}

\def\showfour #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}

\def\showfive #1#2{
\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\tabskip \dimen0 plus 1fil&
##\hfil\cr 
\noalign{\vskip -9pt}                               
#2
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig
\goodbreak
}

\def\tabletwo#1#2#3{\def\entry##1##2{&##1&&##2&\cr}
$$\vbox{\offinterlineskip
\hrule
\halign{&\vrule##&\strut\quad##\hfil\quad\cr
height2pt&\omit&&\omit&\cr
&\b{#1}&&\b{#2}&\cr
height2pt&\omit&&\omit&\cr
\noalign{\hrule}
height2pt&\omit&&\omit&\cr
#3
height2pt&\omit&&\omit&\cr}
\hrule}$$}
 
\def\tablefigtwo#1#2#3#4{\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&##\hfil\cr 
\noalign{\vskip -9pt}
{\bf #2}\hfil&{\bf #3}\hfil\cr
\noalign{\vskip 2pt\hrule\vskip 2pt}
#4
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig}

\def\tablefigthree#1#2#3#4#5{\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&##\hfil\tabskip \dimen0 plus
1fil&##\hfil\cr 
\noalign{\vskip -9pt}
{\bf #2}&{\bf #3}&{\bf #4}\cr
\noalign{\vskip 2pt\hrule\vskip 2pt} 
#5
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig}

\def\tablefigfour#1#2#3#4#5#6{\boxfig
{\dimen0=1pc
\tabskip 2\dimen0
\halign to \hsize {##\hfil\tabskip \dimen0&##\hfil
\tabskip 0pt plus 1fil&\tabskip 1\dimen0
##\hfil&##\hfil\tabskip 2\dimen0\cr
\noalign{\vskip -9pt}
{\bf #2}&{\bf #3}&{\bf #4}&{\bf #5}\cr
\noalign{\vskip 2pt\hrule\vskip 2pt}
#6
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig}

%Untested. Taken from table in FLOOR, now flushed. -kmp 3-Oct-91
\def\tablefigfive#1#2#3#4#5#6#7{\boxfig
{\dimen0=.75pc
\tabskip \dimen0 plus .5 fil
\halign to \hsize {##\hfil\tabskip \dimen0 plus 1fil&##\hfil\tabskip 
\dimen0 plus .5 fil&##\hfil\tabskip \dimen0 plus 1fil&##\hfil\tabskip \dimen0
plus 1fil&##\hfil\cr 
\noalign{\vskip -9pt}
{\bf #2}&{\bf #3}&{\bf #4}&{\bf #5}&{\bf #6}\cr
\noalign{\vskip 2pt\hrule\vskip 2pt}
#7
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig}

\def\tablefigsix#1#2#3#4#5#6#7#8{\boxfig
{\dimen0=1pc
\tabskip 2\dimen0
\halign to \hsize {##\hfil\tabskip \dimen0&##\hfil
\tabskip 0pt plus 1fil&\tabskip 1\dimen0  
##\hfil&##\hfil\tabskip \dimen0&##\hfil
\tabskip 0pt plus 1fil&\tabskip 1\dimen0  
##\hfil\cr    
\noalign{\vskip -9pt}
{\bf #2}&{\bf #3}&{\bf #4}&{\bf #5}&{\bf #6}&{\bf #7}\cr
\noalign{\vskip 2pt\hrule\vskip 2pt}
#8
\noalign{\vskip -9pt}
}}
\caption{#1}
\endfig}
