25

\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}

2 Answers 2

35

Change \thempfootnote.

\documentclass{article}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\begin{document}
\begin{minipage}{.5\textwidth}
test this\footnote{abc}
\end{minipage}
\end{document}
5
  • small typo \arabic{mpfootnote} should be \arabic{footnote} right?
    – colinfang
    Commented May 18, 2011 at 5:41
  • 4
    @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
    Commented May 18, 2011 at 6:41
  • @Danie - Can u check my updated question?
    – colinfang
    Commented May 18, 2011 at 7:21
  • @colinfang: please look at the explanation below
    – Danie Els
    Commented May 18, 2011 at 7:51
  • 1
    So, mp here means minipage? Commented Sep 17, 2016 at 13:59
10

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}
2
  • 1
    great examples
    – colinfang
    Commented May 18, 2011 at 20:59
  • How can I use the footnote label defined in one table within another table? Commented Oct 11, 2016 at 15:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .