20

\renewcommand method does not work

\documentclass{article}
\renewcommand{\thefootnote}{\arabic{footnote}}
\begin{document}

\begin{minipage}{1.3\textwidth}

test this\footnote{abc}
\end{minipage}

\end{document}

In the following example the footnote number is incorrect. Why?

\documentclass{article}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\begin{document}
\begin{minipage}{.5\textwidth}
test this\footnotemark
\footnotetext{abc}
\end{minipage}
\end{document}
27

Change \thempfootnote.

\documentclass{article}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\begin{document}
\begin{minipage}{.5\textwidth}
test this\footnote{abc}
\end{minipage}
\end{document}
  • small typo \arabic{mpfootnote} should be \arabic{footnote} right? – colinfang May 18 '11 at 5:41
  • 1
    @colinfang: NO, there are two footnote counters, footnote for the normal footnotes and mpfootnote inside minipages. The last one is zeroed every time a minipage is entered. It is therefor a BAD idea to change it to \arabic, because you can end up with different footnotes with the same number on one page. – Danie Els May 18 '11 at 6:41
  • @Danie - Can u check my updated question? – colinfang May 18 '11 at 7:21
  • @colinfang: please look at the explanation below – Danie Els May 18 '11 at 7:51
  • So, mp here means minipage? – Αλέξανδρος Ζεγγ Sep 17 '16 at 13:59
9

If your objective is to just continue with the "global" footnotes through a minipage then look at the example below. It illustrates the two different footnotes and how to use both inside a minipage.

\documentclass{article}
\usepackage{footmisc}% for \footref and \mpfootnotemark
\begin{document}
\noindent\ldots{} main text\footnote{Before minipage} \ldots\par
\fbox{\begin{minipage}{.5\linewidth}
    Footnotes in minipages are numbered using
    lowercase letters\footnote{Inside minipage\label{fn:1}}.\\
    To reuse the previous minipage footnote\footref{fn:1}.\\
    A second minipage footnote\footnote{Again}.\\
    A footnote to use global\footnotemark.\\
    A second global footnote\footnotemark.
\end{minipage}}
%--- Directly after minipage ----------------------------
\addtocounter{footnote}{-1}%
\footnotetext{First global footnote inside minipage}%
\stepcounter{footnote}%
\footnotetext{Second global footnote inside minipage}%
%--------------------------------------------------------
\par
\noindent\ldots{} main text\footnote{After minipage} \ldots\par
\end{document}

If you want all footnotes to be numeric then you must set the mpfootnote counter at the begining of the minipage and reset the footnote counter at the end. Please do not now use \footnotemark inside the minipage, because it will mess up everything.

\documentclass{article}
\begin{document}
\noindent\ldots{} main text\footnote{Before minipage} \ldots\par
\fbox{\begin{minipage}{.5\linewidth}
        \setcounter{mpfootnote}{\value{footnote}}%
        \renewcommand{\thempfootnote}{\arabic{mpfootnote}}%
    Footnotes in minipages\footnote{Inside minipage}.\\
    A second minipage footnote\footnote{Again}.
        \setcounter{footnote}{\value{mpfootnote}}%
\end{minipage}}
\par
\noindent\ldots{} main text\footnote{After minipage} \ldots\par
\end{document}
  • great examples – colinfang May 18 '11 at 20:59
  • How can I use the footnote label defined in one table within another table? – Ruben Verborgh Oct 11 '16 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.