# Making \vfill work with footmisc package

I had some trouble getting my footnotes to stick to the bottom of the page, so I used:

\usepackage[hang,bottom]{footmisc}.


This solved the problem, but for one part of my document I want to place a single line at the bottom of the page, and I do this with:

\vfill


Normally this works fine, but there is a footnote on the page and the [bottom] option of footmisc seems to reserve whitespace above the footnote for some reason, so \vfill doesn't push the line all the way to the bottom. I can of course place it manually, but that's not why I'm using Latex. Any workaround for this would be greatly appreciated.

Here's a MWE:

\documentclass[a4paper]{article}
\usepackage[hang,bottom]{footmisc}
\begin{document}
This is my text\footnote{this is my footnote}
\vfill
This is my bottom-of-page comment
\end{document}


The bottom option essentially adds \vfill at the end of every page, so your \vfill makes TeX divide the blank space in two equal chunks.

Use third order infinite glue:

\documentclass[a4paper]{article}
\usepackage[hang,bottom]{footmisc}

\begin{document}

This is my text\footnote{this is my footnote}

\vspace{0pt plus 1filll}

This is my bottom-of-page comment

\end{document}


• "Third-order infinite glue". Is that sort of like "double-secret probation"? I knew the problem, I just didn't have the secret handshake for the quick solution. – Steven B. Segletes Jun 2 '16 at 17:15
• @StevenB.Segletes \vfil is the same as \par\vspace{0pt plus 1fil} (first order infinite glue), \vfill the same as \par\vspace{0pt plus 1fill} (second order infinite glue). But there's a third order, for tough cases. – egreg Jun 2 '16 at 17:17
• ...for those stubborn stains that are hard to get out, eh? Bravo! – Steven B. Segletes Jun 2 '16 at 17:18
• @StevenB.Segletes Very powerful bleaching. – egreg Jun 2 '16 at 17:19
• And there it is on p.72, Knuth. I'm kicking myself, even though "the use of this highest infinity is not encouraged". – Steven B. Segletes Jun 2 '16 at 17:20

Based on Measure remaining space on page and use it on another page, I formulated the \fixV macro, applied to the end-of-page comment.

\documentclass[a4paper]{article}
\usepackage[hang,bottom]{footmisc}
\newcommand\fixV[1]{\edef\tmp{\the\parindent}\setbox0=\hbox{%
\begin{minipage}{\textwidth}\hspace{\tmp}\strut#1\strut\end{minipage}}\box0%
\vspace{\dimexpr-\pagegoal+\pagetotal+\baselineskip}}
\begin{document}
This is my text\footnote{this is my footnote}
\vfill
\fixV{This is my bottom-of-page comment}
\clearpage
This is my text\footnote{this is my footnote}
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
\vfill
\fixV{This is my bottom-of-page comment}\clearpage
This is my text\footnote{this is my footnote}
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
This is my text This is my text This is my text This is my text This is my text
\vfill
\fixV{This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment
This is my bottom-of-page comment This is my bottom-of-page comment}
\end{document}