[Tex/LaTex] How to get footnote text with elsarticle at the bottom of a table

elsarticlefootnotestables

I am trying to place footnotes at the bottom end of a table as shown in figure with elsarticle, but so far I am not successful.

enter image description here

MWE

\documentclass{elsarticle}
\usepackage{booktabs}
\begin{document}
\begin{table}[]
\centering
\caption{Row sub numbering}
\label{my-label}
\begin{tabular}{llll}
\toprule
S. No. & X & Y  & Z \\
\midrule
1      & 1 & 12 & 1 \\
2      & 4 & 34 & 3 \\
3      & 5 & 54 & 2\tnoteref{t1} \\
4      & 1 & 44 & 7 \\
5      & 4 & 11 & 4 \\
\bottomrule
\end{tabular}
\tnotetext[t1]{Footnote}
\end{table}
\end{document}

With the MWE I am able to get the footnote symbol, but the footnote text does not appear. How to get footnote text with elsarticle at the bottom of a table?

Best Answer

Of course you can't obtain a table note: \tnoteref and \tnotetext are commands defined in the elsarticle class, not for table notes, but for title notes.

To have foot notes at the bottom of tables, use the threeparttable package. I suggest to use alphabetic numbering of these footnotes – this will be less confusional in a table with numbers, and will not disrupt the system of ‘normal’ footnotes.

Should you need to cross-reference these table footnotes, you should use the threeparttablex, and extension of threeparttable to longtable, at the cost of a slightly different syntax.

\documentclass{elsarticle}
\usepackage{booktabs}
\usepackage{threeparttable}

\begin{document}

\begin{table}[]
  \centering
  \begin{threeparttable}
    \caption{Row sub numbering}
    \label{my-label}
    \begin{tabular}{llll}
      \toprule
      S. No. & X & Y & Z \\
      \midrule
      1 & 1 & 12 & 1 \\
      2 & 4 & 34 & 3 \\
      3 & 5 & 54 & 2\tnote{a} \\
      4 & 1 & 44 & 7 \\
      5 & 4 & 11 & 4 \\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}
      \item[a]{Footnote}
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document} 

enter image description here