# [texhax] Longtable

Tue Jul 10 21:25:27 CEST 2012

On Tue, Jul 10, 2012 at 09:09:43AM -0700, Sally wrote:

> I have a longtable in my document which is causing the tables to not
> appear in the correct order in the ps file. If I use
>
> \begin{longtable}{|l|l|l|l|l|}[htbp]
>
> I get the following error:
>
> ! Misplaced \noalign
>
> How do I fix this problem?

"[htbp]" cannot be used with longtable, because a longtable
environment might span several pages (the purpose of the environment).
Therefore it isn't a floating environment. "[htbp]" is typeset as
text in the first cell of the first row. Therefore a following
\hline throws the error with "Misplaced \noalign".

\begin{longtable}{|l|l|l|l|l|}
\hline
...
\end{longtable}

Yours sincerely
Heiko Oberdiek