# Very long footnotes cause page breaks

If a document has very long footnotes close to each other in the main text, LaTeX start to compensate for this by breaking the page (see the first picture below).

I am grateful that TeX makes an effort to put footnotes close to the corresponding mark, but no thank you, TeX, this is too much. No matter what, it should not break the page, nor make the paragraph skips longer (which is almost as ugly) or use any of its other usual, dirty tricks; I prefer having the footnote five pages after the mark if that is what it takes. Can someone find a way to make TeX stop breaking the page like this?

I tried experimenting with both bigfoot and interfootnotelinepenalty=0, which changed the input, but did not remove the problem. Furthermore, bigfoot caused the nightmare shown on the second picture below. Notice that the footnotes run out of the page itself.

Note that memoir is not the problem either; change to article and load geometry, and exactly the same happens. Also, the A5 format is not the issue either; it just makes the problem even worse than when using A4.

A MWE:

\documentclass[a5paper]{memoir}

\usepackage{lipsum}
%\usepackage{bigfoot}
%\interfootnotelinepenalty=0

\begin{document}
\lipsum[1]\footnote{\lipsum[1-10]}
\lipsum[1]\footnote{\lipsum[1-15]}
\lipsum[1]\footnote{\lipsum[1-10]}
This needs a footnote\footnote{\lipsum[1-10]}, and it is very necessary in order not to cause confusion.
\end{document}


The output:

The output with bigfoot:

• i have doubts that what you ask is possible. the behavior you see is what is described in the texbook. maybe something could be done with luatex, but i suggest that you consider using endnotes instead. – barbara beeton Apr 13 '15 at 19:37
• Did Don really consider this strange behaviour of TeX to be right? – Gaussler Apr 13 '15 at 19:39
• This isn't, of course, an answer to your question as stated, but have you considered turning your footnotes into endnotes? In memoir, the command \foottopagenote automatically re-purposes the \footnote infrastructure, and all you need to add is one or more strategically placed \printpagenotes commands. 12.6 in the latest memoir manual. Your readers may prefer "long" footnotes this way, too... – Brent.Longborough Apr 13 '15 at 19:41
• Also: \usepackage{bigfoot} and \DeclareNewFootnote{default} is how to use bigfoot with regular footnotes. – jon Apr 13 '15 at 19:48
• You should try with \lipsum* everywhere, because \lipsum adds paragraph breaks that make it more difficult to see the real result. With this I get no strange break, with pdflatex or lualatex – egreg Apr 13 '15 at 19:51

You could try to change \floatingpenalty in \@footnotetext (globally or locally). But imho it would much saner to shorten the footnotes.

\makeatletter
\long\def\@footnotetext#1{\insert\footins{%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty 100 %<---
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark
}%
\color@begingroup
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}


## Edit 2017

As packages like footmisc can change \@footnotetext it is probably better to patch the definition (after all packages which could change the definition again have been loaded):

  \usepackage{etoolbox}
\makeatletter
\patchcmd\@footnotetext{\@MM}{100}{}{\fail}
\makeatother


Instead of a fix value of 100 one could also use a command or a counter which could be redefined locally.

• I assume you also want a \makeatother? – Gaussler Apr 13 '15 at 20:06
• And I still get the same, unfortunately. – Gaussler Apr 13 '15 at 20:09
• the \makeatletter is necessary, the \makeatother not ;-) – Ulrike Fischer Apr 13 '15 at 20:10
• Well it works for me with your example. – Ulrike Fischer Apr 13 '15 at 20:14
• @UlrikeFischer: I’ve noted that the LaTeX kernel sets \dimen\footins to 8in (see latex.ltx, l. 6219), and that this value seems to remain in effect when the document is typeset. This could explain why, with A5 paper, setting \floatingpenalty to a small value does not yield the desired result in all situations (if TeX is allowed to fill up a whole page with footnotes, it might prefer to do so even if floating a footnote to a later page isn’t much costly…). – GuM Mar 7 '17 at 18:40