TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 Dec 11 '11 at 8:15
up vote 6 down vote accepted

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 \#&\\}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.