# htbp and longtable

I am applying a longtable environment. I would like to use something like [htbp] in order to put the table in the next page. Every time I do it gives me an error. Now I am solving the problem with a simple \pagebreak. Do you know a better solutions to this problem?

-

longtablehas no such options because it makes no sense to have a longtable in a floating object. You can use only [lcr] as option for the environment longtable for the horizontal alignment. Use \newpage if you want to start the longtable on the next page. And, of course, do not put the longtableenvironment in a tableenvironment.

-

If you are forcing the page break anyway probably better to use \clearpage rather than \newpage to prevent any tables floating past the longtable and getting out of order.

If you want to avoid a forced page break and want longtable to move to a natural page break (and you are feeling brave) you can do

\usepackage{afterpage}


Then

\afterpage{\clearpage\begin{longtable}.......\end{longtable}}


If the table is very long it might be better (and certainly take up less TeX memory) if you put (just) the longtable in a separate file, say mytable.tex then

\afterpage{\clearpage\input{mytable}}

-