I have a document with hundreds of longtables throuhout it. While checking the final document it turned out that the headers are putting wrong section names just as described here. A possible solution to this has been presented here, namely to make a small change in
longtable.sty. This however did not work for me as it generated several unwanted page breaks just out of nowhere.
The source of the problem is described in the answer linked to above:
\topmarkis set by the final iteration of the LT output routine, but not passed on to the standard routine. The standard routine would just pick up the mark again as the final table section is re-considered by the page breaker
So here is my question: How could I edit
longtable.sty so that longtables do not make a mess? Does anyone know how to pass
\topmark from the LT output routine to the standard routine (whatever it means...)?