4

I'm using the aastex document class (trying to get a table done in the Astrophysical Journal format) and I have this table I'm trying to produce but it keeps getting right justified almost to the point of cutting off the table. I'm not sure how to fix this and I've tried a few things I've found on Google to no benefit. Here's my (shortened code):

\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}

Lookin' for some pointers. Thank you.

5
  • This table has no chance of fitting on a normal page except in landscape mode. However, I'd write: \begin{longtable}{@{}c|c|c|c|c|c|c|c|c|c|c}. Add \usepackage{showframe} to see how the table is placed with respect to the the margins. – jon Oct 22 '13 at 1:18
  • since your table are too wide, used the answer here Center figure that is wider than \textwidth – Tawei Oct 22 '13 at 1:27
  • as others have said you need to make your table narrower, but the center environment has no effect on longtable – David Carlisle Oct 22 '13 at 1:34
  • 1
    @selwyndd21 the mechanisms in the answers there do not apply to longtable – David Carlisle Oct 22 '13 at 1:47
  • 1
    @David, thanks for pointing out. I found that questions have been answered in Center wide longtable. – Tawei Oct 22 '13 at 1:53
2

Your table is centered, but too wide (horizontally). In *.log file we can find

Overfull \hbox (79.52667pt too wide) in alignment at lines 6--17

This is over 1.1 inch. You should make your table thinner to notice the effect of centering. For example, the following changes (I don't know, if acceptable) make your table not too wide. (Additional text to show the text width).

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.