我正在使用 aastex 文档类(尝试以《天体物理学杂志》格式制作表格),我有这个表格,我想制作它,但它一直右对齐,几乎要切断表格。我不知道如何解决这个问题,我尝试了我在 Google 上找到的几种方法,但毫无用处。这是我的(缩短的代码):
\documentclass{aastex}
\usepackage{longtable}
\begin{document}
\begin{center}
\begin{longtable}{c|c|c|c|c|c|c|c|c|c|c}
\caption{NGC2264 Protostars}\\
\hline
\multicolumn{1}{c}{Name} & \multicolumn{1}{c}{RA} & \multicolumn{1}{c}{DEC} & \multicolumn{1}{c}{Mean I1} & \multicolumn{1}{c}{Mean I2} & \multicolumn{1}{c}{Alpha K2} & \multicolumn{1}{c}{Class} & \multicolumn{1}{c}{Alpha K8} & \multicolumn{1}{c}{Av} & \multicolumn{1}{c}{Avg Av}\\
\hline
\hline
Mon-000101 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39 & I & 0.39 & 31.1 & 31.1 \\
Mon-000171 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45 & I & 0.45 & 33.7 & 33.7 \\
Mon-000174 & 100.27621 & 9.563802 & 11.605 & 10.134 & 0.95 & I & 1.29 & 30.8 & 30.8 \\
Mon-000191 & 100.28709 & 9.495832 & 9.231 & 8.105 & 1 & I & 1.01 & 0 & 0 \\
Mon-000323 & 100.25761 & 9.576176 & 9.385 & 8.513 & 0.31 & I & 0.04 & 16.8 & 16.8 \\
\end{longtable}
\end{center}
\end{document}
寻求一些指点。谢谢。
答案1
你的餐桌是居中,但水平方向太宽。在 *.log 文件中,我们可以找到
第 6-17 行对齐时 \hbox 过满(宽 79.52667pt)
这超过了 1.1 英寸。您应该让表格变窄,才能注意到居中效果。例如,以下更改(我不知道是否可以接受)会使您的表格不太宽。(附加文本以显示文本宽度)。
\documentclass{aastex}
\usepackage{longtable}
\begin{document}
\overfullrule5pt
{\tiny
Some text. Some text. Some text. Some text. Some text. Some text. Some text, text.
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
}
\begin{center}
\begin{longtable}{c|c|c|c|c|c|c|c|c|c|c}
\caption{NGC2264 Protostars}\\
\hline
\multicolumn{1}{c}{Name} & \multicolumn{1}{c}{RA} & \multicolumn{1}{c}{DEC} & \multicolumn{1}{c}{Mean I1} & \multicolumn{1}{c}{Mean I2} & \multicolumn{1}{c}{$\alpha$ K2} & \multicolumn{1}{c}{Class} & \multicolumn{1}{c}{$\alpha$ K8} & \multicolumn{1}{c}{Av} & \multicolumn{1}{c}{Avg Av}\\
\hline
\hline
101 & 100.27242 & 9.608597 & 11.082 & 10.034 & 0.39 & I & 0.39 & 31.1 & 31.1 \\
171 & 100.2923 & 9.52286 & 14.834 & 14.385 & 0.45 & I & 0.45 & 33.7 & 33.7 \\
174 & 100.27621 & 9.563802 & 11.605 & 10.134 & 0.95 & I & 1.29 & 30.8 & 30.8 \\
191 & 100.28709 & 9.495832 & 9.231 & 8.105 & 1 & I & 1.01 & 0 & 0 \\
323 & 100.25761 & 9.576176 & 9.385 & 8.513 & 0.31 & I & 0.04 & 16.8 & 16.8 \\
\end{longtable}
\end{center}
\end{document}