Controlling longtable page breaks

Let' see.

  1. rows which should never be followed by a page break
  2. rows which can be followed by a page break if necessary
  3. rows which mark the preferred page break locations

Number 1 can be done with \\* as you have noticed. However, there is a bug that causes this not to work if it is followed by a \cline. There is a patch for this (see longtable multirow problem with cline and nopagebreak).

Number 2 is the normal row ending \\.

Number 3 can be done by adding \noalign{\penalty-5000} after the \\. The 5000 can be changed to get more or less preference for a page break. This will only work if there is enough stretchability in the page.

You can add stretchable space between rows with \noalign{\vskip 12pt plus 6pt}, but then the vertical lines will be broken.


enter image description here

In order to make finite amounts of stretech have any effect between rows you need to modify longtable not to add infinite stretch at the bottom of the page (like using \flushbottom instead of \raggedbottom the package doesn't have an interface for that but just deleting \vss where it appears produces

enter image description here

\documentclass[12pt,a5paper]{article}

\usepackage{longtable}

\newcounter{bla}
\newcommand\bla{\stepcounter{bla}row\thebla}

\setlength{\baselineskip}{12pt plus 1pt}

\makeatletter
\def\LT@output{%
  \ifnum\outputpenalty <-\@Mi
    \ifnum\outputpenalty > -\LT@end@pen
      \LT@err{floats and marginpars not allowed in a longtable}\@ehc
    \else
      \setbox\z@\vbox{\unvbox\@cclv}%
      \ifdim \ht\LT@lastfoot>\ht\LT@foot
        \dimen@\pagegoal
        \advance\dimen@-\ht\LT@lastfoot
        \ifdim\dimen@<\ht\z@
          \setbox\@cclv\vbox to \textheight{\unvbox\z@\copy\LT@foot}%
          \@makecol
          \@outputpage
          \setbox\z@\vbox{\box\LT@head}%
        \fi
      \fi
      \global\@colroom\@colht
      \global\vsize\@colht
      \vbox to \textheight
        {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}%
    \fi
  \else
    \setbox\@cclv\vbox to \textheight{\unvbox\@cclv\copy\LT@foot}%
    \@makecol
    \@outputpage
      \global\vsize\@colroom
    \copy\LT@head\nobreak
  \fi}

\begin{document}


\begin{longtable}{c}
\bla \\* \bla type 2 \\ \bla \\* \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 1fill minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\bla \\* \bla type 2 \\ \bla \\* \bla type 3\\\noalign{\vspace{10pt plus 5pt minus 2pt}}
\end{longtable}


\end{document}