[Tex/LaTex] \footnotetext and \footnotemark do not work in table environment

footnotestables

I have some issues in the using of \footnote in a table. My code is as follows, in which I use the packages \usepackage{footnote} and \usepackage{tabularx}. But the text of footnote is not shown below the table, where only the superscript "1" and "2" appear aside the relevant items. I need the superscript shown as "a", "b", "c",…

\documentclass[12pt,a4paper,twoside]{report}
\usepackage[latin1]{inputenc}
\usepackage{multirow}
\usepackage{geometry}\geometry{top=3cm,bottom=3cm,left=3.7cm,right=2.5cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\setlength{\headheight}{15pt}

\setcounter{secnumdepth}{4}

\usepackage{titlesec}
\titleformat{\chapter}[display]{\normalfont\Huge\bfseries}{\chaptertitlename 
\ \thechapter}{15pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-3\baselineskip}{20pt}[3.7cm]

\renewcommand{\figurename}{Figure}
\renewcommand{\bibname}{References}
\hyphenpenalty=10000
\tolerance=2500
\usepackage{longtable}
\raggedbottom

\usepackage{cite}
\usepackage{hyperref}

\usepackage{nomentbl}
\usepackage[toc,page]{appendix}
\usepackage{enumitem,calc}

\usepackage{booktabs}
\usepackage{bigstrut}
\usepackage{rotating}
\usepackage{multirow}

\usepackage{footnote}
\usepackage{tabularx}

\usepackage{lscape}
\usepackage{setspace}\linespread{1.6}
\setlength\parskip{3pt plus 1.5pt minus 1.5pt}%paragraph

\begin{document}
Some text here, as listed in Table~\ref{tab}.

\begin{table*}
  \centering
  \caption{Caption of the table}\label{tab}
  \begin{tabularx}{\textwidth}{lccc}
  \toprule
       x11            &x12 \footnotemark[1]   &x13 \footnotemark[2]    &x14 \footnotemark[2] \\
       \midrule
       x21            &x22                    &x23                     &x24                  \\
       x31            &x32 \footnotemark[1]   &x33 \footnotemark[1]    &x34                  \\
       \bottomrule
  \end{tabularx}
  \footnotetext[1]{This is the 1st footnote}%
  \footnotetext[2]{This is the 2nd footnote}%
\end{table*}

\end{document}

update: I have corrected the code according to the comment of @ Skillmon.

Best Answer

enter image description here

beside threeparttable you can use "classic" approach as I mentioned in comment above:

\documentclass[12pt,a4paper,twoside]{report}
\usepackage[latin1]{inputenc}
\usepackage{multirow}
\usepackage{geometry}\geometry{top=3cm,bottom=3cm,left=3.7cm,right=2.5cm}
\usepackage{booktabs}
\usepackage{footnote}
\usepackage{tabularx}

\begin{document}
Some text here, as listed in Table~\ref{tab}.

\begin{table*}[ht]
    \begin{minipage}{\linewidth}
        \renewcommand\footnoterule{}
        \renewcommand{\thefootnote}{\alph{footnote}}
  \caption{Caption of the table}\label{tab}
  \begin{tabularx}{\textwidth}{Xccc}
  \toprule
       x11            &x12 \footnotemark[1]   &x13 \footnotemark[2]    &x14 \footnotemark[2] \\
       \midrule
       x21            &x22                    &x23                     &x24                  \\
       x31            &x32 \footnotemark[1]   &x33 \footnotemark[1]    &x34                  \\
       \bottomrule
  \end{tabularx}
      \vspace{-1.5ex}% <-- added
  \footnotetext[1]{This is the 1st footnote}%
  \footnotetext[2]{This is the 2nd footnote}%
    \end{minipage}
\end{table*}

\end{document}

note: if you use tabularx environment for table, than at least one column had to be X type.

Related Question