如何在两个面板下方放置一个共同的脚注?

如何在两个面板下方放置一个共同的脚注?

我确实遇到了一个问题,即在下表下方放置一个对于两个面板都很重要且通用的表格注释:

\documentclass[a4paper,12pt]{article}
\usepackage{fancyhdr}
\usepackage[a4paper,lmargin={2.5cm},rmargin={2.5cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage[]{graphicx}
\usepackage{float}
\usepackage{eurosym}
\usepackage{amsmath} % for equations over multiple lines
\usepackage[hang,bottom]{footmisc} % Fußzeile bleibt am Boden %
\usepackage{natbib}  % havard style citation
\usepackage{grffile}
\usepackage{bbm}
\usepackage{longtable} % table over two pages
\usepackage{graphicx}
\usepackage{caption}
\usepackage{adjustbox}
\usepackage{subcaption}

\usepackage[flushleft]{threeparttable} %note below table

\usepackage{url}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother


\newtheorem{theorem}{Definition}[section]




\setlength{\parindent}{0pt}
\setlength{\footnotemargin}{0.8em}

\usepackage[titletoc,title]{appendix}
\usepackage[nottoc,notlot,notlof]{tocbibind}

\usepackage{hyperref}
\linespread{1.25}
\floatstyle{plaintop}
\restylefloat{table}

\begin{document}



\begin{table}[H]
\scalebox{0.9}{%
\caption{How to put a common table note below both tables - on that is nut just below one but holds for both panels? } 

\begin{tabular}{cc}

    \begin{minipage}{.5\linewidth}
   \begin{threeparttable}
\subcaption*{Panel A: Default Classification}
\begin{tabular}{lrr}
\hline\hline
\multicolumn{1}{l}{Variable}&\multicolumn{1}{c}{A}&\multicolumn{1}{c}{B(\%)}\tabularnewline
\hline
yyyyyyyyyyyyyyyyyy&$0.5104$&$0.02$\tabularnewline
xxxxxxxxxxxxxxxxxx&$0.5098$&$0.00$\tabularnewline
\hline
\end{tabular}


\end{threeparttable}
    \end{minipage} &

    \begin{minipage}{.5\linewidth}
      \begin{threeparttable}
      \subcaption*{Panel B: Prepaid Classification}
\begin{tabular}{lrr}
\hline\hline
\multicolumn{1}{l}{Variable}&\multicolumn{1}{c}{A}&\multicolumn{1}{c}{B(\%)}\tabularnewline
\hline
yyyyyyyyyyyyyyyyyy&$0.5104$&$0.02$\tabularnewline
xxxxxxxxxxxxxxxxxx&$0.5098$&$0.00$\tabularnewline
\hline
\end{tabular}

\end{threeparttable}
    \end{minipage} 


\end{tabular}
}


\end{table}


\end{document}

我已经尝试过 raggedright 和 threeparttable - 但没有成功。

欢迎任何帮助!

答案1

您可以使用和threeparttable的机制,但将放在新的中心位置,位于其他的下方:\tnotetablenotestablenotesthreeparttable

示例输出

\documentclass[a4paper,12pt]{article}

\usepackage{float}
\usepackage[hang,bottom]{footmisc} % Fußzeile bleibt am Boden %
\usepackage{graphicx}
\usepackage{subcaption}

\usepackage[flushleft]{threeparttable} %note below table

\setlength{\parindent}{0pt}
\setlength{\footnotemargin}{0.8em}

\usepackage{hyperref}
\linespread{1.25}
\floatstyle{plaintop}
\restylefloat{table}

\begin{document}

\begin{table}
  \caption{How to put a common table note below both tables---one that
  is not just below one but holds for both panels? }
  \centering
  \begin{threeparttable}
    \subcaption*{Panel A: Default Classification}
    \begin{tabular}{lrr}
      \hline\hline
      \multicolumn{1}{l}{Variable\tnote{1}}
      &\multicolumn{1}{c}{A}
      &\multicolumn{1}{c}{B(\%)}
        \tabularnewline
        \hline
        yyyyyyyyyyyyyy
      &$0.5104$
      &$0.02$
        \tabularnewline
        xxxxxxxxxxxxxx
      &$0.5098$
      &$0.00$
        \tabularnewline
        \hline
    \end{tabular}
  \end{threeparttable}
  \quad
  \begin{threeparttable}
    \subcaption*{Panel B: Prepaid Classification}
    \begin{tabular}{lrr}
      \hline\hline
      \multicolumn{1}{l}{Variable\tnote{1}}
      &\multicolumn{1}{c}{A}
      &\multicolumn{1}{c}{B(\%)}
        \tabularnewline
        \hline
        yyyyyyyyyyyyy
      &$0.5104$
      &$0.02$
          \tabularnewline
        xxxxxxxxxxxxx
      &$0.5098$
      &$0.00$
        \tabularnewline
        \hline
      \end{tabular}
    \end{threeparttable}

    \begin{minipage}{.5\linewidth}
      \begin{threeparttable}
        \begin{tablenotes}
        \item[1] These variables have long names.
        \end{tablenotes}
      \end{threeparttable}
    \end{minipage}

  \end{table}

\end{document}

我已删除与特定问题无关的软件包。

答案2

解决方案如下floatrow

\documentclass[a4paper,12pt, english]{article}
\usepackage{fancyhdr}
\usepackage[a4paper,hmargin=2.5cm, vmargin=2cm]{geometry}
\usepackage{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
%\usepackage{float}
\usepackage{eurosym}
\usepackage{amsmath} % for equations over multiple lines
\usepackage[hang,bottom]{footmisc} % Fußzeile bleibt am Boden %
\usepackage{natbib} % harvard style citation
\usepackage{grffile}
\usepackage{bbm}
\usepackage{longtable} % table over two pages
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{floatrow}
\usepackage[flushleft]{threeparttable} %note below table

\usepackage{url}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother

\newtheorem{theorem}{Definition}[section]

\setlength{\parindent}{0pt}
\setlength{\footnotemargin}{0.8em}

\usepackage[titletoc,title]{appendix}
\usepackage[nottoc,notlot,notlof]{tocbibind}

\usepackage{hyperref}
\linespread{1.25}
\floatstyle{plaintop}
\restylefloat{table}

\begin{document}

\begin{table}[!h]
\captionsetup[sub]{font=footnotesize}
\floatsetup[subtable]{floatrowsep=qquad}
\ttabbox[\FBwidth]{%
\begin{threeparttable}%
\begin{subfloatrow}%
\ttabbox[\FBwidth]{\caption*{Panel A: Default Classification}}
{%
\begin{tabular}{lrr}
\hline\hline
\multicolumn{1}{l}{Variable\tnote{a}}&\multicolumn{1}{c}{A}&\multicolumn{1}{c}{B(\%)}\tabularnewline
\hline
yyyyyyyyyyyyyyyyyy&$0.5104$&$0.02$\\
xxxxxxxxxxxxxxxxxx&$0.5098$&$0.00$\\
\hline
\end{tabular}}%
\ttabbox[\FBwidth]{\caption*{Panel B: Prepaid Classification}}
{\begin{tabular}{lrr}
\hline\hline
\multicolumn{1}{l}{Variable}&\multicolumn{1}{c}{A}&\multicolumn{1}{c}{B(\%)}\tabularnewline
\hline
yyyyyyyyyyyyyyyyyy&$0.5104$&$0.02$\tnote{b}\\
xxxxxxxxxxxxxxxxxx&$0.5098$&$0.00$\\
\hline
\end{tabular}}
\end{subfloatrow}
\begin{tablenotes}\footnotesize
 \item[a] First table note.
\item[b] Another table note, with some quite long text. Some more text.
\end{tablenotes}
\end{threeparttable}}%
{\caption{How to put a common table note below both tables - on that is nut just below one but holds for both panels? }}
\end{table}

\end{document} 

在此处输入图片描述

相关内容