% COMPLEXT.TEX - A sample AASTeX table with complex column headings. 

% This complex but short example of the deluxetable environment, using 
% either the apjpt or aj_pt style file, demonstrates some of the techniques
% that can be used to generate complex column headings and to align
% variable-width columns.

% In this example the LaTeX \multicolumn command is used to span a heading
% over several columns.  When \multicolumn is used along with the 
% \cutinhead command the \tablecolumns command must be used to specify
% the number of columns in the table - otherwise the \cutinhead command
% will not work properly.

% Note the use of the LaTeX command \cline and the use of a blank column
% between the two \cline commands needed to separate the horizontal lines
% generated by them.

% This table also makes use of the \phn command to better align some of the 
% columns.  Also see \phd, \phs, and \phm{} - other commands useful for column 
% alignment.  All of these commands insert a blank space equivalent to a 
% number (\phn), a decimal point (\phd), a minus sign (\phs), or any character
% you wish to use (\phm{text}).

\documentstyle[apjpt4]{article}
%\documentstyle[aj_pt4]{article}

\begin{document}

\begin{deluxetable}{rrrrrrrr}
\tablecolumns{8}
\tablewidth{0pc}
\tablecaption{Percentage of Fake Stars Lost}
\tablehead{
\colhead{}    &  \multicolumn{3}{c}{Non-shell Stars} &   \colhead{}   & 
\multicolumn{3}{c}{Shell Stars} \\
\cline{2-4} \cline{6-8} \\
\colhead{Mag} & \colhead{F336W}   & \colhead{F555W}    & \colhead{F814W} & 
\colhead{}    & \colhead{F336W}   & \colhead{F555W}    & \colhead{F814W}  } 
\startdata
20.25 & 2.2$\pm$7.4\phn & \nodata & \nodata &
& 0.9$\pm$6.8 & \nodata & 0.0$\pm$44.7 \nl
20.75 & 2.4$\pm$7.8\phn & \nodata & 2.8$\pm$7.4 &
& 1.7$\pm$6.6 & \nodata & 1.4$\pm$6.7\phn \nl
21.25 & 0.1$\pm$7.7\phn & \nodata & 1.7$\pm$7.6 &
& 2.6$\pm$6.5 & \nodata & 0.9$\pm$6.6\phn \nl
21.75 & 2.4$\pm$4.5\phn & 2.2$\pm$7.4 & 0.1$\pm$7.6 & 
& 7.1$\pm$4.5 & 0.9$\pm$6.8 & 3.3$\pm$6.5\phn \nl
22.25 & 3.4$\pm$3.1\phn & 1.8$\pm$7.7 & 2.9$\pm$4.4 &
& 11.8$\pm$3.6 & 0.4$\pm$6.6 & 5.7$\pm$4.4\phn \nl
22.75 & 4.5$\pm$2.9\phn & 1.8$\pm$7.7 & 4.7$\pm$3.1 &
& 26.2$\pm$3.6 & 3.4$\pm$6.5 & 10.9$\pm$3.6\phn \nl
23.25 & 7.0$\pm$2.4\phn & 3.4$\pm$4.5 & 3.7$\pm$2.9 &
& 44.2$\pm$3.3 & 10.7$\pm$4.5 & 20.6$\pm$3.5\phn \nl
\cutinhead{More data}
23.75 & 12.4$\pm$2.7\phn & 4.1$\pm$3.1 & 6.7$\pm$2.5 &
& 59.8$\pm$4.0 & 20.1$\pm$3.6 & 32.6$\pm$3.4\phn \nl
24.25 & 30.2$\pm$3.1\phn & 5.3$\pm$2.9 & 10.0$\pm$2.7 &
& 74.9$\pm$5.1 & 35.8$\pm$3.6 & 43.1$\pm$4.0\phn \nl
24.75 & 66.8$\pm$5.5\phn & 10.4$\pm$2.4 & 16.5$\pm$3.2 &
& 83.7$\pm$6.1 & 56.3$\pm$3.3 & 57.0$\pm$5.2\phn \nl
25.25 & 87.5$\pm$35.4 & 20.0$\pm$2.7 & 28.0$\pm$5.6 &
& \nodata & 71.5$\pm$4.0 & 71.8$\pm$6.2\phn \nl
25.75 & \nodata\phn & 55.3$\pm$3.1 & \nodata &
& \nodata & 81.2$\pm$5.1 & \nodata\phn \nl
26.25 & \nodata\phn & 85.1$\pm$5.5 & \nodata &
& \nodata & 85.6$\pm$6.1 & \nodata\phn \nl
\enddata
\end{deluxetable}

\end{document}
