The \clearpage macro outputs any remaining floats and then starts a new page.
I am after a command that outputs any remaining floats, does not start a new page and enables any following text to be put after the last float on the same page.
I have tried, to no avail,
% hprob.tex SE 639516
\documentclass{memoir}
\usepackage{lipsum}
\usepackage{placeins} % provides \FloatBarrier
\usepackage{comment}
%\show\clearpage
\makeatletter
\newcommand{\flushfloats}{% A revision of \clearpage
\ifvmode
\ifnum @dbltopnum = \m@ne
\ifdim \pagetotal <\topskip \hbox{} \fi
\fi
\fi
% \newpage
% \write \m@ne {} % \vbox {} % \penalty -@Mi%
}
\makeatother
\begin{document}
\chapter{First}
%Introductory text.
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
\begin{table}
\centering A TABLE
\caption{A table}
\end{table}
%\clearpage
\FloatBarrier
\flushfloats
\lipsum[1]
\end{document}
My \flushfloats will output all the floats but then move on to the next page, which I do not want. It still acts like \clearpage.

\@toplistor\@bottomlist. Anyway, the key here is\@deferlist. – John Kormylo Apr 05 '22 at 20:17