davidcarlisle / dpctex

Assorted TeX packages
93 stars 30 forks source link

double head on one page #8

Closed u-fischer closed 3 years ago

u-fischer commented 6 years ago

This document prints the head twice on the second page:

\documentclass{article}
\usepackage{longtable}
\begin{document}
\vspace*{42\baselineskip}

\begin{longtable}{l}
\caption{title}\endhead
abc\\
abc
\end{longtable}

\end{document}

twice

The issue disappears if one add this patch:

\documentclass{article}
\usepackage{longtable}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\LT@start{\vskip\LTpre}{\vskip\LTpre\endgraf}{}{\fail}
\makeatother
\begin{document}
\vspace*{42\baselineskip}

\begin{longtable}{l}
\caption{title}\endhead
abc\\
abc
\end{longtable}

\end{document}