I have a document where text should float around a landscape page that I insert with \afterpage{}
. If (as is the case for me) a paragraph is 'broken' by afterpage (i.e. the paragraph starts before the landscape page and ends after) and at the same time there is a footnote, then that footnote goes onto an otherwise empty page all by its own.
Here is a MWE:
\documentclass[11pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{afterpage} %for landscape pages with text floating around
\usepackage{pdflscape} %for landscape pages
\usepackage{bigfoot} % for better footnotes
\usepackage{lipsum} % for testing
\interfootnotelinepenalty=10000
\begin{document}
\lipsum[1-4]
\afterpage{
\begin{landscape}
It doesn't matter what I put here.
\end{landscape}
\clearpage
}
Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text. Text text text text text text text text text text text text text text text text.\footnote{This is a footnote to a paragraph that starts on the page before afterpage and ends after the afterpage. The footnote should be on the page after, but instead it goes on an extra page. }
\lipsum[7-8]
\end{document}
Desired behavior: The footnote on what is page 2 when you compile the example should be on what is currently page 4. This should of course eliminate page 2 so that there are only three pages in total (i.e. the footnote would then be on page 3).
Not a solution: I know I could break the concerned paragraph in two, but I prefer to avoid doing so. It is a connected piece of information and a break would be artificial. Same for moving around text since I have footnotes all over.
afterpage
does say: This is really a pre-release, to see whether people like the idea of a command like this. This implementation is not particularly robust. This implementation does not work in two column mode, and can get `confused' by \LaTeX's floating environments.\usepackage{bigfoot}
then it does the right thing.bigfoot
appears to be using\marks
rather than footnote insertions to encode footnotes and afterpage wasn't expecting that,\newcommand{\oldfootnote}{\footnote}
before calling\usepackage{bigfoot}
but that still gives the undesired result. Then I'm not familiar with defining my own commands so I might be overlooking stuff.