This is similar to How to disable pagebreak on \hline in longtable? but for supertabular or xtab: With \tabularnewline\hline I get pagebreaks (or in my case columnbreaks) before the hline, i.e. the hline appears at the top of the next column. I'm using this code to make supertabular work inside multicols.

How can I change this so that the hline is kept together with the row?

  • 1
    Would you be able to provide a minimal working example (MWE)? Call me lazy, but I find it much easier to work with that piecing together code from different sources.
    – Werner
    Commented Dec 11, 2011 at 8:15

1 Answer 1


This takes the example in the question you cited and redefines supertab's \\ to look ahead for \hline and suck it back before the page breaking code. this version doesn't take care if \hline\hline but could be extended.

        \advance\n by1
                \hfill T\hfill\hfill F\hfill\hskip0pt\endgraf
                \hrule height3ex

                \hrule width\linewidth height0pt


\tablehead{Item \#&\\}

You must log in to answer this question.

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