Graphics, Figures & TablesFootnote in table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
itb1000
Posts: 25
Joined: Mon Sep 29, 2008 4:19 pm

Footnote in table

Post by itb1000 »

Hi,
I would like to insert footnotes in a table.
I use to following script

Code: Select all

\begin{table} 
  \begin{tabular}{llll} \hline 
    column 1 & column 2 & column 3\footnotemark[1] & column 4\footnotemark[2] \\ \hline 
    row 1 & data 1 & data 2 & data 3 \\ 
    row 2 & data 1 & data 2 & data 3 \\ 
    row 3 & data 1 & data 2 & data 3 \\ \hline 
  \end{tabular} 
  \footnotetext[1]{table footnote 1} 
  \footnotetext[2]{table footnote 2} 
  \caption{Table with rows, columns and footnotes}\label{tbl:data} 
\end{table}
the table is created, there is no error message and the footnote numbering appears in the table but there is no footnote text at the bottom of the table.
Can somebody explain me how?
How can I solve the problem?
Thanks,
Thierry

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Footnote in table

Post by gmedina »

HI,

move the \footnotetext commands outside the table environment; this however will cause the footnotes to appear at the bottom of the page (as the first table in my example below shows); if you want the footnotes to appear right after the table, then you could use the threeparttable package (have a look at the second table in my example code).

Code: Select all

\documentclass{article}
\usepackage{threeparttable}


\begin{document}

%A table with footnotes appearing at the bottom of the page:
\begin{table}
  \centering
  \begin{tabular}{llll}
  \hline
  column 1 & column 2 & column 3\footnotemark[1] & column 4\footnotemark[2] \\
  \hline
  row 1 & data 1 & data 2 & data 3 \\
  row 2 & data 1 & data 2 & data 3 \\
  row 3 & data 1 & data 2 & data 3 \\
  \hline
  \end{tabular}
  \caption{Table with footnotes at the bottom of the page}
  \label{tab:test1}
\end{table}
\footnotetext[1]{table footnote 1}
\footnotetext[2]{table footnote 2}

\clearpage

%A table with footnotes appearing at the bottom of the table:
\begin{table}
  \centering
  \begin{threeparttable}[b]
  \caption{Table with footnotes after the table}
  \label{tab:test2}
  \begin{tabular}{llll}
  \hline
  column 1 & column 2 & column 3\tnote{1} & column 4\tnote{2} \\
  \hline
  row 1 & data 1 & data 2 & data 3 \\
  row 2 & data 1 & data 2 & data 3 \\
  row 3 & data 1 & data 2 & data 3 \\
  \hline
  \end{tabular}
  \begin{tablenotes}
    \item[1] tablefootnote 1
    \item[2] tablefootnote 2
  \end{tablenotes}
 \end{threeparttable}
\end{table}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
itb1000
Posts: 25
Joined: Mon Sep 29, 2008 4:19 pm

Re: Footnote in table

Post by itb1000 »

Thanks, it works well!
Thierry
Post Reply