Notas de rodapé de tabela avançadas

Notas de rodapé de tabela avançadas

Preciso colocar notas de rodapé nas tabelas como no exemplo a seguir, tirado para a Revisão Física B:

insira a descrição da imagem aqui

Desde Física. Rev. B está escrito em LaTeX (RevTeX), acredito que isso deveria ser possível com qualquer classe. Estou usando Classic Thesis com o pacote ArsClassica. Já consegui algo muito semelhante usando uma minipágina:

\begin{table}
    \begin{minipage}{\textwidth}
    \centering
    \begin{tabular}{l c c c c c c}
    \toprule
    & $a$ (\si{\angstrom}) & $c/a$ & $u$ & $B_0$ (\si{\giga\pascal}) & $B_0'$ & $E_g$ (\si{\electronvolt})\\
    \midrule
    GGA & \num{3.126} & \num{1.602} & \num{0.382} & \num{191} & \num{3.67} & \num{4.10}\\
    GGA\footnote{\cite{Stampfl1999}.} & \num{3.113} & \num{1.619} & \num{ 0.380} & \num{192} & \num{3.69} & \num{4.25}\\
    GGA\footnote{\cite{Zoroddu2001}.} & \num{3.110} & \num{1.606} & \num{0.382} & - & - & - \\
    Exp.\footnote{\cite{Stampfl1999}.} & \num{3.111} & \num{1.601} & \num{0.385} & \num{185}-\num{212} & \num{5.7}-\num{6.3}& \num{6.28} \\
    Exp.\footnote{\cite{Schulz1977}.} & \num{3.110} & \num{1.601} & \num{0.382} & \num{202} & - & - \\

    \bottomrule
    \end{tabular}
    \end{minipage}

    \caption{Caption on top.}

\end{table}

Este é o resultado:

insira a descrição da imagem aqui

Porém, aqui você pode identificar um grande problema: como usei uma minipágina de largura \textwidth, as notas de rodapé não ficam alinhadas com a tabela (como no exemplo). É possível conseguir esse alinhamento? Como?


Seguindo a resposta de Bernard, usei isto:

\begin{table}
    \centering
    \begin{threeparttable}
    \caption{Comparison of calculated binding energy and bond lengths for \ce{O2} and \ce{N2} with experimental and other theoretical values.}
    \begin{tabular}{l c c c c}
    \toprule
    & $E_b^\text{\ce{O2}}$ (\si{\electronvolt}) & $d_\text{\ce{O}-\ce{O}}$ (\si{\angstrom})& $E_b^\text{\ce{N2}}$ (\si{\electronvolt}) & $d_\text{\ce{N}-\ce{N}}$ (\si{\angstrom})\\
    \midrule
    GGA & \num{-5.855} & \num{1.215} & \num{-10.138} & \num{1.096} \\
    GGA\tnote{a}& - & - & \num{-9.867}& \num{1.105}\\
    GGA\tnote{b} & - & - & \num{-10.558} & \num{1.113}\\
    Exp.\tnote{c} & \num{-5.12} & \num{1.21} & - & - \\
    Exp.\tnote{a} & - & - & \num{-9.9}& \num{1.10}\\
    \bottomrule
    \end{tabular}

    \begin{tablenotes}
        \item[a] \cite{Stampfl1999}.
        \item[b] \cite{Zoroddu2001}.
        \item[c] \cite{Wang2008}.
    \end{tablenotes}
    \end{threeparttable}
\end{table}

Porém, parece-me que há um problema com a legenda, que aparentemente está restrita ao mesmo comprimento da tabela:

insira a descrição da imagem aqui

Responder1

Você pode fazer isso com threeparttable, que define um ambiente de mesmo nome e um tablenotesambiente. Se você colocar a legenda entre os ambientes tablee threeparttable, a legenda terá uma largura de textwidth; se você colocardentro threeparttable, sua largura será a largura real da tabela:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry} 
\usepackage{booktabs, caption}
\captionsetup{labelfont=sf, width =\textwidth}
\usepackage{siunitx}
\usepackage[flushleft]{threeparttable}

\begin{document}

\begin{table}[!htbp]
\centering
    \caption{Caption on top. A long long long and very very silly caption . A long long long and very very silly caption.}
  \begin{threeparttable}
    \begin{tabular}{l c c c c c c}
      \toprule
                    & $a$ (\si{\angstrom}) & $c/a$ & $u$ & $B_0$ (\si{\giga\pascal}) & $B_0'$ & $E_g$ (\si{\electronvolt}) \\
      \midrule
      GGA & \num{3.126} & \num{1.602} & \num{0.382} & \num{191} & \num{3.67} & \num{4.10} \\
      GGA\tnote{a} & \num{3.113} & \num{1.619} & \num{ 0.380} & \num{192} & \num{3.69} & \num{4.25} \\
      GGA\tnote{b} & \num{3.110} & \num{1.606} & \num{0.382} & -- & -- & -- \\
      Exp.\tnote{c} & \num{3.111} & \num{1.601} & \num{0.385} & \num{185}-\num{212} & \num{5.7}-\num{6.3} & \num{6.28} \\
      Exp.\tnote{d} & \num{3.110} & \num{1.601} & \num{0.382} & \num{202} & -- & -- \\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}
      \item[a]\cite{Stampfl1999}
      \item[b]\cite{Zoroddu2001}
      \item[c]\cite{Stampfl1999}
      \item[d]\cite{Schulz1977}
    \end{tablenotes}
  \end{threeparttable}
  \label{table2}
\end{table}



\begin{table}[!htbp]
\centering
  \begin{threeparttable}
    \caption{Caption on top. A long long long and very very silly caption . A long long long and very very silly caption.}

    \begin{tabular}{l c c c c c c}
      \toprule
                    & $a$ (\si{\angstrom}) & $c/a$ & $u$ & $B_0$ (\si{\giga\pascal}) & $B_0'$ & $E_g$ (\si{\electronvolt}) \\
      \midrule
      GGA & \num{3.126} & \num{1.602} & \num{0.382} & \num{191} & \num{3.67} & \num{4.10} \\
      GGA\tnote{a} & \num{3.113} & \num{1.619} & \num{ 0.380} & \num{192} & \num{3.69} & \num{4.25} \\
      GGA\tnote{b} & \num{3.110} & \num{1.606} & \num{0.382} & -- & -- & -- \\
      Exp.\tnote{c} & \num{3.111} & \num{1.601} & \num{0.385} & \num{185}-\num{212} & \num{5.7}-\num{6.3} & \num{6.28} \\
      Exp.\tnote{d} & \num{3.110} & \num{1.601} & \num{0.382} & \num{202} & -- & -- \\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}
      \item[a]\cite{Stampfl1999}
      \item[b]\cite{Zoroddu2001}
      \item[c]\cite{Stampfl1999}
      \item[d]\cite{Schulz1977}
    \end{tablenotes}
  \end{threeparttable}
  \label{table2}
\end{table}

\end{document} 

insira a descrição da imagem aqui

Responder2

O OP comentou que gostou da minha resposta emUsando \footnote na \caption de uma figura, embora estivesse interessado em automatizar o cálculo da minipagelargura. Aqui mostro como isso pode ser feito. Coloco o tabularconteúdo em um \defarquivo . para facilitar a recuperação e, em seguida, coloco-o em um arquivo \hbox. Posso então usar \wd0como minipagelargura e apenas recuperar o tabularconteúdo com a macro definida nele.

\documentclass[12pt]{article}
\usepackage{boxhandler}
\begin{document}
This is an alternate way to do a footnote in a table, with the minipage
environment.
\begin{table}[ht]
  \def\tblcontent{\footnotesize\begin{tabular}{|l|c|c|}
    \hline
    Title & Column 1 & Column 2\\
    \hline
    First Test & 1.234 & 5.389\footnote{\scriptsize This is the
     footnote text blah blah blah blahty blah}\\
    \hline
    Second Test & 3.894 & 1.586~~\\
    \hline
  \end{tabular}}
  \setbox0=\hbox{\tblcontent}
  \centering
  \caption{Caption goes here}
  \begin{minipage}{\wd0}   % GUESS (OR CALCULATE) MINIPAGE WIDTH
    \renewcommand\footnoterule{}     % ELIMINATE LITTLE LINE SEPARATER
    \tblcontent
    \vspace{-2ex}                    % SHIFT FOOTNOTE UP
  \end{minipage}
\end{table}
\end{document}

insira a descrição da imagem aqui

informação relacionada