# prevent page break after AASTeX deluxetable \tablecomments and the next deluxetable?

The issue is the following: there are two deluxetables (AASTeX) set after another. The \tablecomments of the first extends extends over a page boundary, such that one line of text lands on a new page.

I'd like the next deluxetable to start right after the previous table (i.e. right after those tablecomments). That is, it should start on the same page.

However, for some reason the next deluxetable adds a page break. So the page is basically blank, except for that one line of \tablecomments. Looks quite ugly.

How to get the next deluxetable to start on the same page after the previous deluxetable? And at the same time, retain the automatic page breaks in deluxetable?

It is rather hard to post a MWE on this, it would be a very long example. Essentially the code is:

\documentclass{article}
\begin{document}

\begin{deluxetable}{cc}
\tabletypesize{\scriptsize}
\tablecaption{Test 1. \label{tab:test1}}
\tablewidth{0pt}
\startdata
% ... a lot of data, automatically split over 2 pages ...
% Should be long enough so that Table Comments start at the end of one page
% and continue with one line onto the next page.
\endata
\vspace{-0.6cm}
\tablecomments{Some rather long comment here that needs at least two lines.}
\end{deluxetable}

% The next deluxetable should start right after the first one, on the same
% page as the trailing Table Comments of the first table. For some reason, it does not.

\begin{deluxetable}{cc}
\tabletypesize{\scriptsize}
\tablecaption{Test 2. \label{tab:test2}}
\tablewidth{0pt}
\startdata
% ... a lot of data as well, automatically split over 2-3 pages ...
\endata
\vspace{-0.6cm}
\end{deluxetable}

\end{document}


These deluxetables are floating objects. As far as I can make out their parameters are bp meaning that can be placed at the bottom of the page, or on a separate float page. Now by default LaTeX does not reserve much room for floats at the bottom of the page, indeed \bottomfration is by default 0.3 meaning that they may only fill the bottom 30% of the page. Also by default the number of floats allowed at the bottom, as controlled by bottomnumber is 1. You need to boost both these values to have a chance of getting both tables on the same page. For example:

\documentclass{aastex}

\renewcommand{\bottomfraction}{0.8}
\setcounter{bottomnumber}{2}

\begin{document}
Text.

\begin{deluxetable}{cc}
\tabletypesize{\scriptsize}
\tablecaption{Test 1. \label{tab:test1}}
\tablewidth{0pt}
\startdata
% ... a lot of data, automatically split over 2 pages ...
% Should be long enough so that Table Comments start at the end of one page
% and continue with one line onto the next page.
\enddata
\vspace{-0.6cm}
\tablecomments{Some rather long comment here that needs at least two lines.}
\end{deluxetable}

% The next deluxetable should start right after the first one, on the same
% page as the trailing Table Comments of the first table. For some reason, it does not.

\begin{deluxetable}{cc}
\tabletypesize{\scriptsize}
\tablecaption{Test 2. \label{tab:test2}}
\tablewidth{0pt}