I have a long text with a lot of very short footnotes in it. There is an unfortunate amount of white space at the bottom of a lot of pages. How can I get the footnotes to write to the same line and then wrap around? This footnote code I have right now is there to force the footnotes to respect the bottom margin. Anything else can go. I tried this and it was not working for me.
\documentclass[preprint,nofootinbib]{revtex4-2}
\usepackage{lipsum}
\usepackage{etoolbox}
\footnotesep=2pt
\makeatletter
\patchcmd{@footnotetext}
{\setspace@singlespace}{0.1}
{}{}
\makeatother
\begin{document}
\count\footins = 1000
Words\footnote{Short footnote.} words words words\footnote{Short footnote.} words\footnote{Short footnote.} words words words words words words words words\footnote{Short footnote.} words words\footnote{Short footnote.} words\footnote{Short footnote.} words words words words\footnote{Short footnote.} words words words words words.\footnote{Short footnote.} Words\footnote{Short footnote.} words words words\footnote{Short footnote.} words\footnote{Short footnote.} words words words words words words words words\footnote{Short footnote.} words words\footnote{Short footnote.} words\footnote{Short footnote.} words words words words\footnote{Short footnote.} words words words words words.\footnote{Short footnote.}
\end{document}
Above is the code to replicate the screenshot. I actually have a lot of other stuff in my header. Just in case some of it might interfere with a proposed solution, I am also including the full header which I editted out above:
\documentclass[preprint,nofootinbib]{revtex4-2}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{textcomp}
\usepackage{varwidth}
\usepackage{titletoc}
\usepackage{titlesec}
\usepackage{etoolbox}
\usepackage[skins,breakable]{tcolorbox}
%%% FOOTNOTES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\footnotesep=11pt
\makeatletter
\patchcmd{@footnotetext}
{\setspace@singlespace}{0.1}
{}{}
\makeatother
%%% ADD HYPERREF AFTER FOOTNOTES: FORMAT PROBLEM %%%%%%%%%%%
\usepackage[hidelinks]{hyperref}
%%% DEFINE SECTION TITLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\section}[block]{\large\bfseries\filcenter}{\S \thesection.}{.1em}{}
%%% DEFINE BOX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newsavebox{\myboxbox}
\NewDocumentEnvironment{mybox}{+b}
{\centering
\setlength{\parindent}{0pt}%
% measure the text width
\sbox{\myboxbox}{\begin{varwidth}{\dimexpr\columnwidth-24mm}#1\end{varwidth}}\vspace{0.9em}
\begin{tcolorbox}[
breakable,
colback=cyan!5,
width=\dimexpr\wd\myboxbox+8mm,
top=1mm,
bottom=3mm,
%enhanced,
pad at break=2mm
]
\begin{singlespace}
#1
\end{singlespace}
\end{tcolorbox} \vspace{0.3em}
}{}
%%% DEFINE HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\textsc{MAGNIFICENT TITLE}}
\fancyhead[RE,LO]{\textsc{AWESOME NAME}}
\fancyfoot[CE,CO]{\thepage}
\begin{document}
%%% MAKE FOOTNOTES RESPECT BOTTOM MARGIN %%%%%%%%%%%%%%%%%%%
\count\footins = 1000

\usepackage[para]{footmisc}would do this for you. But it does not appear to work well withrevtex4-2. – Steven B. Segletes Apr 02 '21 at 02:20