TeX Live 2014 on Xubuntu 14.04 LTS.

Minimal working example:

\documentclass[11pt, oneside]{report}


    \caption[]{\rule{2mm}{2cm}} \\
    Col 1 \\
    \hline \endfirsthead
    \caption[]{\textit{continued from the previous page}} \\
    Col 1 \\
    \hline \endhead
    \multicolumn{1}{r}{\textit{continued on the next page}} \\
    1 \\
    1 \\
    1 \\
    1 \\

Trying to compile this MWE results in the following message:

! Misplaced \noalign.
\newpage ->\noalign 
                    {\break }
l.30 \end{longtable}

The \clearpage is necessary for the effect. Also, the first table head must not fit on the page. Reducing the first rule from 16cm to 14cm works.

On a side note: at 15cm other fancy stuff is happening, but I am not concerned about that right now.

Question(s): How can I avoid this error? What causes this problem exactly?

Both questions probably supplement each other.

Update 2015-12-03: After some rest, I realized that there probably is no simple solution to this question. Both, afterpage and longtable, need to work at the end of a page. When longtable wants to start a new page, afterpage would/should want to kick in. That may not be a technical explanation, but probably hits the nail on the head as well. I assume that one would have to make afterpage longtable-aware or the other way around to make this work. In the meantime, I am using a \newpage right before the longtable.

Before posting, I looked at these related questions and did not find an answer in there: longtable misplaced noalign, Longtable breaks afterpage, https://tex.stackexchange.com/questions/147169/misplaced-noalign-when-using-afterpage-clearpage-with-either-onehafspacing, captionof in longtable gives Misplaced \noalign, Longtable alignment with caption, ! Misplaced \omit. Longtable Error and Caption Misalign Extra alignment tab has been changed to \cr.

  • Put the longtable INSIDE the \afterpage, after the \clearpage. Dec 2, 2015 at 20:38
  • Unfortunately, this is just a workaround. Currently, I am using a \newpage before the longtable which I find cleaner in my case. There, \afterpage contains \clearpage before and after a \begin{landscape} ... \end{landscape}.
    – Kreuvf
    Dec 3, 2015 at 11:37
  • Yes, same issue. It's a real pain in the butt.
    – DLyons
    Oct 1, 2018 at 15:57

1 Answer 1


Funny, or not, I have the exact same issue.

Since the latex code is generated I can't manually change the code to "fit".

Here's my minimal example, which isn't as minimal as I want to.

\usepackage{fancyhdr, lastpage}
\newgeometry{total={210mm,297mm}, head=56pt, top=10mm, left=10mm, right=10mm, bottom=58pt, includeheadfoot}


\begin{longtable}{ l}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .