# longtable on dedicated tables page

I have written a document that includes many tables, so I have chosen to place all tables at the end of the document, invoked via the [p] option in the table environment. I now have to include a long table via the longtable environment, and am wondering if there is an equivalent form of the [p] option here (or at least some workaround).

-

The p option does not put the tables at the end of the document. It puts the floating object on floating pages without text. Each \clearpage can force the pages to be output before end of document, for instance.

You can use package endfloat to move the tables to the end of the document. Even longtable environments can be put there, if they are declared as tables for endfloat. Example follows. See the package documentation for more options.

\documentclass{article}
\usepackage{longtable}
\usepackage[
tablesonly,
notablist,
nomarkers,
]{endfloat}
\DeclareDelayedFloatFlavor{longtable}{table}

\begin{document}
\section{First section}
\begin{table}
\caption{First table}
\end{table}
\begin{longtable}{l}
\caption{Long table}\\
a\\
b\\
\end{longtable}
\begin{table}
\caption{Last table}
\end{table}
\section{Last section}
\end{document}

-