longtable - start on next page

The formatting guidelines that I am bound to require me to have tables either at the top or bottom of a page. Up to now, I used a longtable for every table - even if it does not span multiple pages (but for the sake of consistency).

I found a post by Mico and his proposal to use afterpage which seems to go in the right direction. However, in the following example, the table does not start on the next page as desired but on the page after that. Is there a way to force it on the next page (without manual typesetting)?

\documentclass[]{scrbook}

\usepackage{afterpage}
\usepackage{longtable}
\usepackage{blindtext}

\begin{document}

\blindtext[1]
This is where I inserted afterpage.

\afterpage{%
\footnotesize
\renewcommand*{\arraystretch}{1.2}
\begin{longtable}{{ll}}
\caption{some text}\\
A & B\\
\end{longtable}
}

\blindtext[5]
\end{document}


• If you comment out the blindtext[5] then the table appears at the top of page 2. It must be something about the additional text that's forcing it onto page 3. Can you footnote it instead? That would force it to the bottom of the page. – wolf_math Feb 26 '17 at 1:33
• @wolf_math Thanks for the suggestion! However, I guess that I would have to change a couple of things if I would move the table in a footnote, is there another way? – Max Feb 26 '17 at 2:38

You need a \par at the end:

\documentclass[]{scrbook}

\usepackage{afterpage}
\usepackage{longtable}
\usepackage{blindtext}

\begin{document}

\blindtext[1]
This is where I inserted afterpage.

\afterpage{%
\footnotesize
\renewcommand*{\arraystretch}{1.2}
\begin{longtable}{{ll}}
\caption{some text}\\