我正在尝试创建一个 Latex deluxtable,其中列中有两行,如问题标题中所述,第一行是列名,第二行是单位名。此外,由于我的列标题名称会很长,所以我想在表格下方记下名称。本文的表 1 有一个非常好的例子。 http://iopscience.iop.org/article/10.1088/0004-637X/759/1/53/pdf
我正在使用 aastex6.cls 。到目前为止,我制作了一个如下所示的表格:
\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}
但它不允许两行两列,另外我还需要帮助记录像示例论文那样的列标题。非常感谢您的帮助。
答案1
AASTeX 包中没有内置隐式解决方案。您必须添加一行显式单位。
\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}
您可以在此处找到更多文档6.0版或者v6.1。自从我们升级到 v6.X 以来,表格功能一直在稳步发展。表格注释和列编号有一些不错的功能。
免责声明:我为构建和维护 AASTeX 包的非营利性社会出版商工作。
附言:您还遗漏了列指示器,因为{c c c c}
每列必须有 1 个列指示器。我使用了{deluxetable*}
“*”浮动技巧,而不是以\onecolumngrid
防止表格跨页断裂。
修订:添加了的示例使用\colnumbers, \tablenotemark, \tablecomments
。