8

Following an old discussion about relative positioning of bottom floats and footnotes ("bottom floats above or below footnotes?"), I'd like to avoid altogether bottom floats on pages that also have footnotes.

Is it possible? Very simple question for a maybe hard answer.

Thanks in advance for any clue.

4
  • The hard par is getting bottom floats at all. One could modify \footnote to \setcounter{bottomnumber}{0} and \footnoterule to \setcounter{bottomnumber}{1} (default). Have to test it, of course. Commented Jun 11, 2018 at 19:39
  • Alas, you have to set bottomnumber on the previous page for it to work. It can still be done, but than means using the aux file and everypage. Commented Jun 12, 2018 at 15:39
  • @JohnKormylo My TeX knowledge is not sufficient to fully understand what you mean, can you explain it more extensively, maybe with an answer?
    – mmj
    Commented Jun 12, 2018 at 17:16
  • @JohnKormylo better to use \suppressfloats[b] Commented Jun 12, 2018 at 17:33

2 Answers 2

5

Based on the great answer from John Kormylo. This version is more robust: If the text with the footnote comes at the end of the page, John Kormylos version can break because a footnote after a pagebreak might suppress the float on the former page instead. This can be avoided by moving the code into the output routine:

\documentclass{book}
\usepackage[paperwidth=4.75in,paperheight=7.25in,
            textwidth=4.5in,textheight=6.5in,
            headsep=0.1in, footskip=0.15in,
            marginratio=1:1]{geometry}
\usepackage[latin,english]{babel}
\usepackage{graphicx}
\usepackage{booktabs,lipsum}

\toks0{\ifvoid\footins\else\suppressfloats[b]\fi}
\output\expandafter{\the\toks0\the\output}

\begin{document}

\selectlanguage{latin}
\chapter{Errora}

Una\footnote{translatio via google} imagine\footnote{translatio via google} tabula\footnote{translatio via google}, figura\footnote{translatio via google} et\footnote{translatio via google} \ae\footnote{translatio via google} nigma.\footnote{translatio via google}.  
Una\footnote{translatio via google} imagine\footnote{translatio via google} tabula\footnote{translatio via google}, figura\footnote{translatio via google} et\footnote{translatio via google} \ae\footnote{translatio via google} nigma.\footnote{translatio via google}.  
Una\footnote{translatio via google} imagine\footnote{translatio via google} tabula\footnote{translatio via google}, figura\footnote{translatio via google} et\footnote{translatio via google} \ae\footnote{translatio via google} nigma.\footnote{translatio via google}.  
Una\footnote{translatio via google} imagine\footnote{translatio via google} tabula\footnote{translatio via google}, figura\footnote{translatio via google} et\footnote{translatio via google} \ae\footnote{translatio via google} nigma.\footnote{translatio via google}.  
Una\footnote{translatio via google} imagine\footnote{translatio via google} tabula\footnote{translatio via google}, figura\footnote{translatio via google} et\footnote{translatio via google} \ae\footnote{translatio via google} nigma.\footnote{translatio via google}.  
\begin{figure}[htbp]
\centering
\includegraphics[width=0.3\textwidth]{example-image}
\caption{Uno pictorum} 
\end{figure}
\begin{table}[b]%[htbp] %uncomment to see difference
\centering
\begin{tabular}{cccc}
  \toprule
  Error &Errors &error &errors\\
  \bottomrule
\end{tabular}    
  \caption{Test}
\end{table}
\lipsum[1-6]
\end{document}
2
  • 1
    For beginners and readers in a hurry, to be clearer, in order to avoid bottom floats on pages with footnotes just add to the preamble the two lines \toks0{\ifvoid\footins\else\suppressfloats[b]\fi} and \output\expandafter{\the\toks0\the\output}.
    – mmj
    Commented Jun 13, 2018 at 14:18
  • Unfortunately the snippet wasn't able to do its job for one of my documents, I'll post a MWE as soon as I can.
    – mmj
    Commented Jun 30, 2018 at 8:11
5

Tip of the hat to David Carlisle.

\documentclass{book}
\usepackage[paperwidth=4.75in,paperheight=7.25in,
            textwidth=4.5in,textheight=6.5in,
            headsep=0.1in, footskip=0.15in,
            marginratio=1:1]{geometry}
\usepackage[latin,english]{babel}
\usepackage{graphicx}
\usepackage{booktabs,lipsum}

\let\oldfootnote=\footnote
\def\footnote{\suppressfloats[b]\oldfootnote}

\begin{document}

\selectlanguage{latin}
\chapter{Errora}

Una imagine tabula, figura et \ae nigma.\footnote{translatio via google}.  
\begin{figure}[htbp]
\centering
\includegraphics[width=0.3\textwidth]{example-image}
\caption{Uno pictorum} 
\end{figure}
\begin{table}[b]%[htbp] %uncomment to see difference
\centering
\begin{tabular}{cccc}
  \toprule
  Error &Errors &error &errors\\
  \bottomrule
\end{tabular}    
  \caption{Test}
\end{table}
\lipsum[1-6]
\end{document}
3
  • So the two lines in the preamble \let\oldfootnote=\footnote and \def\footnote{\suppressfloats[b]\oldfootnote} did the trick. Great, thanks!
    – mmj
    Commented Jun 12, 2018 at 18:12
  • Having verified that the other solution is more robust, for correctness towards future readers I have to accept the other answer, although your contribution, as Marcel Kruger also remarks, was crucial. Thanks again.
    – mmj
    Commented Jun 13, 2018 at 12:48
  • @mmj - No problem. I tested it and it definitely works better. OTOH, I can't figure out how it works. I know \output is used to split paragraphs, add footnotes and floats, but \toks0? Commented Jun 15, 2018 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .