latexlongtable

How to fix longtable and bigfoot LaTeX packages conflict?


When I compile a single *.tex file on my local machine, it seems like the longtable and bigfoot packages conflict resulting in wrong "sticking" of the table header on the next page. Code:

\documentclass{scrbook}

\usepackage{bigfoot}
\usepackage{longtable}

\begin{document}

\begin{longtable}{ | c | c | }
\hline
\textbf{First column}  & \textbf{Second column}     \\ \hline
\endhead
test & test \\ \hline
...
test & test \\ \hline
\end{longtable}

\end{document}

First page is correct, while all subsequent pages are wrong: they have the header row detached from the table.

The weird thing is when I comment \usepackage{bigfoot} row, it works.

From my investigation:

I have most of texlive-* packages installed in Ubuntu, and I have found that bigfoot loads the following during compilation:

/usr/share/texlive/texmf-dist/tex/latex/bigfoot/bigfoot.sty
/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty
/usr/share/texlive/texmf-dist/tex/latex/ncctools/manyfoot.sty
/usr/share/texlive/texmf-dist/tex/latex/ncctools/nccfoots.sty
/usr/share/texlive/texmf-dist/tex/latex/bigfoot/suffix.sty
/usr/share/texlive/texmf-dist/tex/latex/bigfoot/perpage.sty

I need to use bigfoot package, as it's used in the project I'm working with, but I want to fix the bug with longtable. Any ideas?


Solution

  • As kindly answered by egreg user on tex.stackexchange.com, the problem is in outdated bigfoot package. The problematic package has shown: Package: bigfoot 2006/07/15 1.25 makes footnotes work

    What I did to fix that was:

    1. Downloaded latest bigfoot package (zip archive) from CTAN
    2. Unpacked it and ran tex bigfoot.ins to generate bigfoot.sty;
    3. Moved it to the directory where it was spotted when compiling my pdf: sudo cp bigfoot.sty /usr/share/texlive/texmf-dist/tex/latex/bigfoot/;
    4. Updated some latex caches: sudo mktexlsr.

    With bigfoot.sty 2015/08/30 2.1 makes footnotes work it works fine.