AASJournals / AASTeX60

Version 6 of the LaTeX style files and documentation for authoring AAS Journal (AJ/ApJ) articles.
https://journals.aas.org/aastex-package-for-manuscript-preparation/
LaTeX Project Public License v1.3c
46 stars 25 forks source link

\cutinhead spans only one column in deluxetable #124

Closed joeharr4 closed 3 years ago

joeharr4 commented 3 years ago

\cutinhead is documented to span the width of the table. It spans only one column. This PDF comes from the code below:

cutinhead1col.pdf

Thanks,

--jh--

\documentclass{aastex63}

\begin{document}

% \cutinhead{} is documented to span the full width of the table.
% It spans only one cell.  Using \multicolumn either inside or 
% outside the \cutinhead call fails.

\begin{deluxetable}{lll}
\tablehead{
\colhead{Col1} &
\colhead{Col2} &
\colhead{Col3}}
\startdata
\cutinhead{Foo Foo Foo}
Col1
& Col2
& Col3
\\
\enddata
\end{deluxetable}

\end{document}
augustfly commented 3 years ago

per the documentation (Section 2.16.2) https://journals.aas.org/aastexguide/

The \tablecolumns{num} command is necessary if an author has multi-line column headings produced by \tablehead or other LATEX commands and is using either the \cutinhead or \sidehead markup (see below). The num argument should be set to the true number of columns in the table. The command must come before the \startdata command.

Two examples of correct code and alternative implementations are provided here.

% \cutinhead is ignorant of the number of cells in
% the deluxetable as it uses \tablecolumns to carry the
% width of the multicolumn. 

\begin{deluxetable}{lll}
\tablecolumns{3}
\tablehead{
\colhead{Col1} &
\colhead{Col2} &
\colhead{Col3}}
\startdata
\cutinhead{Foo Foo Foo}
data1
& data2
& data3
\\
\enddata
\end{deluxetable}

% note that the centering of the cutinhead multicolumn
% appears to be hard coded. Here is an example that 
% does the same thing as cutinhead but left justified.
\begin{deluxetable}{lll}
\tablehead{
\colhead{Col1} &
\colhead{Col2} &
\colhead{Col3}}
\startdata
\noalign{\vskip 1.5ex}% 
\hline \\
\noalign{\vskip -1.5ex}% 
\multicolumn{3}{l}{Foo Foo Foo} \\
\noalign{\vskip .8ex}% 
\hline \\
\noalign{\vskip -2ex}% 
data1
& data2
& data3
\\
\enddata
\end{deluxetable}

see also:

https://github.com/AASJournals/AASTeX60/blob/3a75b1687c0219d0279ff9d9a41ad9b43fa2e7db/cls/aastex63.cls#L1461-L1478