Table columnhead with two rows, first with columnhead name, second with unit

I am trying to create a Latex deluxtable with two rows in the column, as described in the question header, first row with column name and second row with unit name. Also as my column head names will be very long, I want to make a note of the names, just beneath the table. Table 1 of this paper has a very nice example. http://iopscience.iop.org/article/10.1088/0004-637X/759/1/53/pdf

I am using aastex6.cls . So far I made a table that looks like this:

\def\exeter{5}

\documentclass[twocolumn]{aastex6}
\usepackage{natbib}

\bibliographystyle{apj}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{url}
\usepackage[utf8]{inputenc}
\usepackage{fancyref}

\usepackage{ulem} %RTF: for strike-through in resubmission
\usepackage{color} %RTF : For color in resubmission

\begin{document}
\onecolumngrid
\begin{deluxetable}{c c c c }
\tablecaption{Table of simulation runs presented in this paper.\label{simtable}}
\tablehead{\colhead {Run} & \colhead {Detonation} & \colhead {$\rho_c$ (g/cm$^3$) } & \colhead {Bubble Offset (km)} & \colhead {C/O Ratio} }
\startdata
GCD-STD & GCD & $\times 10^9$  & 100 &  50/50 \\
GCD-STD/LOWOFF & GCD & $\times 10^9$  &  50   & 50/50 \\
GCD-HIGHDEN & GCD & $\times 10^9$  &  100 & 50/50 \\
GCD-LOWC & GCD & $\times 10^9$  &  100 & 30/70 \\
GCD-HIGHDENLOWC/HIGHOFF & GCD & $\times 10^9$  &  200 &  30/70 \\
DEF-HIGHDENLOWC/CENTRAL & Pure Deflagration & $\times 10^9$  &  0 &  30/70 \\
DDT-HIGHDENLOWC & DDT &  $\times 10^9$  & 200 &  30/70 \\
\enddata
\end{deluxetable}
\end{document}


but it does not allow two rows columns, also I need help making notes of the column headers like the example paper. your help is very appreciated.

There isn't an implicit solution built into the AASTeX package. You have to add an explicit row of units.

\def\exeter{5}

\documentclass[twocolumn]{aastex6}
\usepackage{natbib}

\bibliographystyle{apj}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{url}
\usepackage[utf8]{inputenc}
\usepackage{fancyref}

\usepackage{ulem} %RTF: for strike-through in resubmission
\usepackage{color} %RTF : For color in resubmission

\begin{document}
%   \onecolumngrid
\begin{deluxetable*}{c c c c c}
\colnumbers
\tablecaption{Table of simulation runs presented in this paper. \label{simtable}}
\tablehead{\colhead {Run\tablenotemark{a}} & \colhead {Detonation} & \colhead {$\rho_c$ }  & \colhead {Bubble Offset} & \colhead {C/O Ratio} \\
\colhead {}    & \colhead {}           & \colhead {(g/cm$^3$)} & \colhead {(km)} & \colhead {} }
\startdata
GCD-STD & GCD & $\times 10^9$  & 100 &  50/50 \\
GCD-STD/LOWOFF & GCD & $\times 10^9$  &  50   & 50/50 \\
GCD-HIGHDEN & GCD & $\times 10^9$  &  100 & 50/50 \\
GCD-LOWC & GCD & $\times 10^9$  &  100 & 30/70 \\
GCD-HIGHDENLOWC/HIGHOFF & GCD & $\times 10^9$  &  200 &  30/70 \\
DEF-HIGHDENLOWC/CENTRAL & Pure Deflagration & $\times 10^9$  &  0 &  30/70 \\
DDT-HIGHDENLOWC & DDT &  $\times 10^9$  & 200 &  30/70 \\
\enddata
\tablenotetext{a}{This sort of table note is less preferred to the column numbers because it is less compact. It works well in one off use cases.}
\tablecomments{Columns include: (1) Explanation of Run; (2) Explanation of Detonation; (3) Explanation of $\rho_c$; (4) Explanation of Bubble Offset; (5) Explanation of C/O ratio}

\end{deluxetable*}
\end{document}


You can find more documentation here for v6.0 or v6.1. Table features have been evolving steadily since we went to v6.X. There are some nice features for table commenting and column numbering.

Disclaimer: I work for the non-profit society publisher that builds and maintains the AASTeX package.

PS: you also were also missing a column indicator in the {c c c c} as there must be 1 column indicator per column. And I used the {deluxetable*} "*" float trick instead of the \onecolumngrid to prevent the table from breaking across the page.

Revision: added example use of \colnumbers, \tablenotemark, \tablecomments.

• HI @Gus, thanks very much. If you have time, can you please show the trick that shows the notes beneath the table which explains the columns head names, just as mentioned in the example paper? – bhjghjh Feb 27 '17 at 19:20
• I will update the example with two ways to you could add explanations to column headers -- the way in your linked PDF article, and a more compact way to do it with column numbers. – Gus Feb 27 '17 at 19:31