0

How can I write a conditional statement to increase the value of \footskip on all pages that include a footnote?

I have tried reading the answers to similar questions (e.g. How to form "if ... or ... then" conditionals in TeX?) but I am having trouble understanding them --- they seem to presume far more prior knowledge than I have.

Noah J
  • 515
  • The problem here is knowing when to test, now how to test. \footins is set by \insert and cannot be tested normally. – John Kormylo Jul 05 '23 at 13:57

1 Answers1

0

You can only do this test in the output routine where \footins is visible with the footnotes, and where \footskip is used. Here I add it to \@makecol

note the page foot moves on pages 2 and 4 that have footnotes

enter image description here

\documentclass[a5paper]{article}
\def\qa{One two three four five \stepcounter{enumi}\roman{enumi} six seven eight. }
\def\qb{\qa\qa Red green blue yellow white black. \qa}
\def\qc{\qb\qa\qb\qb\qa\qb\qa\qb\qb\qa}

\makeatletter \let\old@makecol@makecol \def@makecol{% \ifvoid\footins\else \footskip=60pt % normally 30pt \fi \typeout{Page: \thepage, \footskip=\the\footskip}% \old@makecol} \def@oddfoot{\hrulefill\thepage\hrulefill} \makeatother

\usepackage{geometry} \begin{document}

\qc

\qc\qa\qa\qa

!!!\footnote{here}

\qc\qc\qc\qc\qc

\qb\qb\footnote{and here}\qc\qa\qa\qa

\end{document}

David Carlisle
  • 757,742