Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

\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}
share|improve this question

2 Answers 2

up vote 12 down vote accepted

Change \thempfootnote.

\documentclass{article}
\renewcommand{\thempfootnote}{\arabic{mpfootnote}}
\begin{document}
\begin{minipage}{.5\textwidth}
test this\footnote{abc}
\end{minipage}
\end{document}
share|improve this answer
    
small typo \arabic{mpfootnote} should be \arabic{footnote} right? –  colinfang May 18 '11 at 5:41
    
@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

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}
share|improve this answer
    
great examples –  colinfang May 18 '11 at 20:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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