I'm trying to tell longtable to only issue a page break at one specific point (by using \\*. Putting a \midrule anywhere near that point causes a page break after the midrule, and not where I want it to be.
Consider this MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{longtable,booktabs}
\begin{document}
\begin{longtable}{c}
bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*
bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*
bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*
bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*
bla \\* bla \\* bla \\* bla \\* bla \\*
bla \\*
Last line on this page \\
bla \\*%\midrule
bla \\*
bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*
\end{longtable}
\end{document}
It produces the correct result:
My problem comes up after uncommenting the \midrule:
I tried preventing the page break after the \midrule by inserting \nopagebreak before and/or after it, but to no avail.
P.S.: I know that right fter a rule would usually be a desired point for a page break in a table. However, I am using rules before and after certain lines to create some kind of seperator between blocks of rows. Thus, the rule must stay on top of the following line and the page brak should occur right after the last \\* before the rule.


\global? I worry about introducing regressions elsewhere in my document. – meide Jun 22 '19 at 21:37