# Footnotes as (t)colorboxes

I was just wondering if it would be possible to place footnotes in boxes at the bottom of the page. What I have in mind is to place them side by side, so that the final result is something like this:

Text text text text text text text text text text
text text text text text text text text text text
---------------- ---------------- ----------------
|  Footnote 1  | |  Footnote 2  | | Footnote 3   |
|              | |              | |              |
\--------------/ \--------------/ \--------------/


The best thing would be to be able to use tcolorbox, to have maximum control on the boxes format

• Are you using a package designed for footnotes already or can we assume the traditional LaTeX footnote support? – user31729 Nov 10 '17 at 18:14
• I haven't considered any additional package – Massimo Nov 10 '17 at 18:25
• How do you intend to accommodate long footnotes? Line-breaks within each separate box? If the footnotes are very different in length, do you want to adjust the width of each box? How do you deal with really large numbers of footnotes on one page? This concept seems brittle to me. – Michael Palmer Nov 10 '17 at 18:37
• I'm planning to use footnotes only for bibliographic references, one per footnote. So I don't expect to have very different sizes. And I expect to have from 1 to 3 footnotes per page. I am aware this is quite a peculiar situation, but this is why I thought of a solution like this – Massimo Nov 10 '17 at 18:39

\documentclass{article}
\usepackage[para]{footmisc} % there also is a 'norule' package option that
% will remove the black rule above the footnotes
\usepackage{tcolorbox}
\usepackage[papersize={5.5in,3in},margin=0.25in]{geometry} % small example page

% set the horizontal gap between two footnotes
\newlength{\footgap}
\setlength{\footgap}{0.5em}

\newtcolorbox{nota}{width=4cm,bottom=-1mm,box align=top,colback=gray!20,colframe=red!75!black}

% style the footnote box
\newcommand{\fnbox}[1]{%
\begin{nota}\flushleft
\hspace{-1em}#1
\end{nota}
}

\makeatletter
\long\def\@makefntext#1{\leavevmode%
\mbox{\fnbox{\@makefnmark\hskip.5em\relax#1}\hskip\footgap}}
\makeatother

\begin{document}

Some text\footnote{Cournot, Augustin, and Irving
Fischer. 1971. \emph{Researches into the Mathematical Principles of the
Theory of Wealth.} New York, NY: A. M. Kelley.}

Some more text\footnote{Krajewski, Markus. 2014. The Great Lightbulb Conspiracy'. \emph{IEEE Spectrum}. Updated 25 September.}

Even more text\footnote{Basker, Emek. 2007. ‘The Causes and Consequences of Wal-Mart’s Growth’ \emph{Journal of Economic Perspectives} 21 (3): pp. 177–198.}

\end{document}


• Great. This is exactly what I was looking for. Is there a way to top align boxes (they are currently aligned at the bottom when they are of different height)? – Massimo Nov 11 '17 at 14:04
• I don't see any issue -- when I change the footnote texts, it all seems to remain baseline-aligned. Are you using \tcbox? If so, the package offers ways to specify the alignment of text within each box. – Michael Palmer Nov 11 '17 at 14:14
• I changed it a little, and used \newtcolorbox` to define a new box. Everything is fine, except that whenever the boxes contain a different number of lines, so that their height is different, they align to the bottom; I'd like them aligned to the top instead – Massimo Nov 11 '17 at 23:40
• Can you post an example of your code somewhere that illustrates the problem? – Michael Palmer Nov 11 '17 at 23:48
• You can access my .tex file here tinyurl.com/ybzbyejt – Massimo Nov 12 '17 at 21:28