[Tex/LaTex] Footnote in table

footnotestables

I have some table like the following one and want to write some configuration using ´footnote´.

\begin{table}
  \begin{center}
    \begin{footnotesize}
     \begin{tabular}{|l|l|l|}
     \hline 
     TPA & Components & Cost \\ \hline
      & Total & 56558.4 \\ \hline 
     \end{tabular}
    \end{footnotesize}
    \caption[]{Hardware cost estimation~\footnote{per router}}
    \label{tab:}
  \end{center}
\end{table}

So, I did a method like http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftncapt.
However, I found upper subscript but didn't figure out how to use a footnote in my table.
Where is the footnote I wrote? I want to see "per router".

Could you please fix my LaTeX code?

Best Answer

You might want to use the tablefootnote package (and probably you want to

  1. remove the \begin{footnotesize} \end{footnotesize}, otherwise the table is printed in footnote size;
  2. replace the center-environment by a simple \centering; and
  3. remove the ~ before the \tablefootnote, because the ~ causes a (non-breakable) space before the footnote-mark).

Minimal example:

\documentclass{article}
\usepackage{tablefootnote}
\begin{document}

\begin{table}
  %\begin{center}% replaced by \centering
  \centering
    %\begin{footnotesize}
     \begin{tabular}{|l|l|l|}
     \hline 
     TPA & Components & Cost \\ \hline
      & Total & 56558.4 \\ \hline 
     \end{tabular}
    %\end{footnotesize}
    \caption[Hardware cost estimation]{%
      Hardware cost estimation\tablefootnote{per router}\label{tab:}}
  %\end{center}
\end{table}
\end{document}
Related Question