63

I need to use a minipage environment and I need a footnote in that minipage. I want the footnote to be numbered in the normal footnote sequence and to occur together with the rest of the footnotes in my document. But, as this minimal example shows:

\documentclass{article}

\begin{document}

Spam

\begin{minipage}{.5\linewidth}
    Foo\footnote{bar}
\end{minipage}

Ham

\end{document}

the obvious thing produces a footnote that 1) appears at the bottom of the minipage, and not the page itself, and 2) is "numbered" alphabetically.

How can I get a regular footnote in a minipage?

jub0bs
  • 58,916
vanden
  • 30,891
  • 23
  • 67
  • 87

2 Answers2

54

You should use the footnotemark and footnotetext commands to artificially insert the mark and text.

Modifying your MWE, we have

\documentclass{article}
\begin{document}
Test\footnote{First footnote}

\begin{minipage}{.2\linewidth}
  Test with a bit more text to show that it really is a minipage\footnotemark

  Here is an internal footnote\footnote{Internal footnote}
\end{minipage}
\footnotetext{Second footnote}

Ham

\end{document}

which produces

enter image description here

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
  • But this doesn't work with hyperref as expected – skpblack Jul 16 '14 at 21:41
  • 2
    @Willie Wong When using multiple \footnotemarks inside a single minipage, all \footnotetexts are printed with the same counter (the last one appearing in the minipage). Is there some way to avoid this behavior? – Janosh Nov 19 '16 at 08:00
  • 4
    @Casimir: \footnotemark and \footnotetext take an optional argument [num] which you can use to control the numbers used. See http://www.forkosh.com/latex/ltx-232.html and http://www.forkosh.com/latex/ltx-234.html You will need to manually keep track of the footnotes (e.g. by keeping count of how many you used like in this answer or by stashing the counters somewhere yourself and recalling them outside the minipage. – Willie Wong Nov 20 '16 at 22:55
0

It looks like that if you use the manyfoot package the footnotes are displayed at the bottom of the page:

\documentclass{article}
\usepackage{manyfoot}
\usepackage{lipsum}

\DeclareNewFootnote{A}[arabic] \DeclareNewFootnote{B}[alph]

\begin{document} \subsection{Test section}

\begin{minipage}{0.8\textwidth} This is text in a \texttt{minipage} environment. Here is the first \texttt{minipage} footnote\footnote{First minipage footnote.}. And another \texttt{minipage} footnote\footnote{Second minipage footnote.}. Here\footnoteA{BOTTOM FOOT NOTE A} \footnoteB{BOTTOM FOOT NOTE B} \end{minipage} \ \begin{minipage}{0.8\textwidth} This is text in a \texttt{minipage} environment. Here is the first \texttt{minipage} footnote\footnote{First minipage footnote.}. And another \texttt{minipage} footnote\footnote{Second minipage footnote.}. Here\footnoteA{BOTTOM FOOT NOTE C} \end{minipage} \vspace{10pt}

\end{document}

G M
  • 2,225