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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why \ifnum\c@mpfootnote does not work inside tabular? Should not I get no footnote-rule? I am just puzzled!

\documentclass{article}
\begin{document}
\makeatletter
\long\def\@mpfootnotetext#1{%
 \ifnum\c@mpfootnote=\@ne\let\footnoterule\relax\fi
  \global\setbox\@mpfootins\vbox{%
    \unvbox\@mpfootins
    \reset@font\footnotesize
    \hsize\columnwidth
    \@parboxrestore
    \protected@edef\@currentlabel
         {\csname p@mpfootnote\endcsname\@thefnmark}%
    \color@begingroup
      \@makefntext{%
        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
    \color@endgroup}}
\makeatother
\noindent
\begin{minipage}{\textwidth}
\begin{tabular}{lp{.8\textwidth}}
1&2\footnote{1}\\
1&2\footnote{2}
\end{tabular}
\end{minipage}
\end{document}

A more simplified example:

\documentclass{article}
\begin{document}
\makeatletter
\long\def\@mpfootnotetext#1{%
 \ifnum\c@mpfootnote=\@ne\let\footnoterule\relax\fi
  \global\setbox\@mpfootins\vbox{%
    \unvbox\@mpfootins
    \reset@font\footnotesize
    \hsize\columnwidth
    \@parboxrestore
    \protected@edef\@currentlabel
         {\csname p@mpfootnote\endcsname\@thefnmark}%
    \color@begingroup
      \@makefntext{%
        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
    \color@endgroup}}
\makeatother
\noindent
\begin{minipage}{\textwidth}
\hbox{\footnote{1}}
\end{minipage}
\end{document}
share|improve this question
up vote 3 down vote accepted

I'm not sure what the full intention of the code is but each table cell is a local group so your setting of \footnoterule is lost before it is used.

\global\let\footnoterule\relax

makes the rule go.

share|improve this answer
    
Possibly the best ever answer to MWE length ratio! – Ian Thompson Apr 23 '13 at 13:21

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.