I am using tcolorbox to surround my text with a coloured box.
It seems that it cannot place footnotes at the end of each page. Instead, it places them at the end of the entire box. Demonstration below:
As you can see:
- Footnote 1 appears at the end of the box (because I inserted it using the proper
\footnote{}command. - Footnotes 2-4 are fake - I manually created them using superscripts in the text, and a combination of
\hrule\, the\fakefillcommand, and theenumitempackage.
How can I achieve something like the 'fake' footnotes I created with the \footnote command? I.e. placed at the bottom of the relevant page (not the end of the whole box).
In addition, I'd like the footnote text to be left-aligned with the footnote rule, similar to my fake footnotes, rather than indented in (like the actual footnote 1 at the end).
MWE for the picture above:
\documentclass[12pt]{article}
% look of the page
\usepackage[margin=0.8in, top = 1.3in, bottom = 1.3in, headheight = 0.6in]{geometry}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\setlength{\footskip}{50pt}
\setlength{\footnotesep}{\baselineskip} % space between footnotes
\setlength{\parindent}{0pt} % space at start of paragraph
\setlength{\parskip}{0.14in} % space between paragraphs
% math
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
% relevant to this question
\usepackage{enumitem}
\usepackage[many]{tcolorbox}
\usepackage{xcolor}
\newcommand{\fakebreak}{\par\vspace{\textheight minus \textheight}\pagebreak}
\newcommand{\fakefill}{\par\vspace{\textheight minus \textheight}}
\begin{document}
\begin{tcolorbox}[%
parbox = false,
colback = white, colframe = black,
left = 0.5in, right = 0.5in, top = 0.4in, bottom = 0.4in,
height = 9.06in,
sharp corners,
boxrule = 1pt,
breakable,
]
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
First sentence.\footnote{Footnote 1.} \
Second sentence.$^2$
\fakefill
\par\noindent\rule{0.3\textwidth}{0.4pt}
{\footnotesize
\begin{enumerate}[leftmargin = 0in, rightmargin = 0in, topsep = 0pt]
\item[$^2$] Footnote 2.
\end{enumerate}
}
\newpage
Third sentence.$^3$\
Fourth sentence.$^4$
\fakefill
\par\noindent\rule{0.3\textwidth}{0.4pt}
{\footnotesize
\begin{enumerate}[leftmargin = 0in, rightmargin = 0in, topsep = 0pt]
\item[$^3$] Footnote 3.
\item[$^4$] Footnote 4.
\end{enumerate}
}
\end{tcolorbox}
\end{document}



perpageoption of thefootmiscpackage is deliberately deactivated inside a breakable box since all footnotes are placed at the end of the box [...]" on page 377. – Skillmon Aug 15 '20 at 07:38