条目注释问题

条目注释问题

嗨,有人可以帮我为这个表格添加脚注吗,这里是附加的代码和我的输出表:

 \documentclass{article}
 \usepackage[margin=2cm,a4paper]{geometry} % set page parameters suitably
 \usepackage{booktabs} % For better looking tables
 \usepackage{tabularx}
\setlength{\parindent}{0pt}
\newcommand{\sym}[1]{#1}
\newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}
\newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}
\usepackage{siunitx} % centering in tables
 \sisetup{
detect-mode,
tight-spacing  = true,
group-digits = false ,

 input-open-uncertainty  = ,
 input-close-uncertainty = ,
 table-align-text-post   = false
 }
 \usepackage{ragged2e}
 \usepackage[para,flushleft]{threeparttable}
\renewcommand\TPTtagStyle{\textsf}

 \usepackage{enumitem}
 \newlist{myitemize}{itemize}{1}
 \setlist[myitemize]{noitemsep,left=0pt,label=--}

  \usepackage[colorlinks,allcolors=black]{hyperref} 

 \newcolumntype{P}{>{\RaggedRight\hspace{0pt}}p{\hsize}}
  \newcommand\mytab[1]{\smash{%
\begin{tabular}[t]{@{} P @{}} #1 \end{tabular}}}
 \newcommand{\ZScore}{\mathop{\textnormal{\slshape Z\_Score}}\nolimits}
  \newcommand{\NPLs}{\mathop{\textnormal{\slshape NPLs}}\nolimits}  
\begin{document}

   \begin{table}[h!]
   \caption{Descriptive statistics}
   \label{tab1}
    \centering
        \begin{tabular}{@{}*{2}{>{$}l<{$} cccccccc r@{\ }l}}
       \toprule
     Variables & \multicolumn{4}{c}{Domestic BANKS} & \multicolumn{4}{c}{Foreign BANKS} \\ 
     \cmidrule(l){2-5} \cmidrule(l){6-9}
    & \mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}&\mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}\\ 
  \midrule
  \multicolumn{9}{@{}l}{\textbf{Panel A} : Risk measures}\\ 
  \addlinespace
  \NPLs            & 3.83  & 14   & 0.18 & 2.01 & 3.14  & 9.64 & 0.17 & 1.84\\
  \ZScore          & 13.1  & 14.2 & 1.77 & 5.35 & 13.12 & 14.2 & 2.28 & 3.38 \\
  \midrule
  \multicolumn{9}{@{}l}{\textbf{Panel B} : Political Connections}\\
  \addlinespace 
  CEO\_{PC}       & 0.68  & 1  & 0  & 2.4  & 0.38  & 1   & 0   & 0.66\\
  Board\_{ind}       & 0.28  & 14 & 0  & 6.4  & 0.41  & 13  & 0   & 0.25\\
  \midrule
  \multicolumn{9}{@{}l}{\textbf{Panel C} : Bank Level Variables}\\ 
  \addlinespace              
   LnTA\tnote{a}    & 10.9&12.3&9.63&0.59&11.2& 13.4&8.63&0.68\\
   LTQ \tnote{b}  & 37.4&364.1&9.64&41.5&31.9&508.3&11.2&   32.2 \\
   PRF\tnote{c}    & 3.93&  4.13&   1.02&   2.02&   4.13&   5.83&   2.12&   2.53\\
    EFF\tnote{d}   & 36.2&  56.4&   16.2&   23.2&   25.5&   68.2&   17.9&   19.8\\
   LEV\tnote{e}   & 81.7&   86.2&   74.5&   2.04&   82.4&   110.2&74.64 &3.32\\
   LG\tnote{f}    & 0.21&   58.2&   -1.44&1.25& 0.14&   35.2&   -1.2&   1.32\\
  AG\tnote{g}    & 165  &700&   0   &157&   164 &513&   0   &146\\
  DIV\tnote{h}  & 21.2& 25.6&   14.3&   11.7&   17.4&   19.54&  15.8&   16.4\\
  \midrule
  \multicolumn{9}{@{}l}{\textbf{Panel D}: Ownership variables}\\
  \addlinespace
 MAS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
 ACS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
 \bottomrule
   \end{tabular}
        \medskip
   \begin{tablenotes}
   \footnotesize
   \item[a] Size
  \item[b] Liquidity  
  \item[c] Profitability 
  \item[d] Efficiency
  \item[e] Leverage
  \item[f] Loan\_growth
  \item[g] Asset\_growth
  \item[h] Diversification
  \end{tablenotes}
  \end{table}
  \end{document}

在此处输入图片描述

答案1

编辑: 代码和表格设计略有改进

像这样?

在此处输入图片描述

  • 你忘记将你的桌子封闭到threeparttable环境中
  • 从你的序言中我删除了所有不相关的内容
  • 对于缩写的定义,\multicolumn添加了xparse并定义了它\NewExpandableDocumentCommand
  • 对于带有数字的列,使用S列类型
\documentclass{article}
\usepackage[margin=2cm,a4paper]{geometry} % set page parameters suitably
\setlength{\parindent}{0pt}

\usepackage{booktabs, tabularx}
\usepackage[para,flushleft]{threeparttable}

\usepackage{xparse}  %new
\NewExpandableDocumentCommand\mcc{O{1}m}
    {\multicolumn{#1}{c}{#2}}
\NewExpandableDocumentCommand\mcl{O{9}m}
    {\multicolumn{#1}{@{}l}{#2}}

\usepackage{siunitx} % centering in tables

\usepackage[colorlinks,allcolors=black]{hyperref}

\begin{document}
   \begin{table}[h!]
    \centering
\begin{threeparttable}
   \caption{Descriptive statistics}
   \label{tab1}
%
    \begin{tabular}{@{} >{\itshape}l
                       *{8}{S[table-format=3.2]}
                        }
    \toprule
\multirow{2.4}{*}{Variables} 
    & \mcc[4]{Domestic BANKS} & \mcc[4]{Foreign BANKS}   \\
     \cmidrule(l){2-5} \cmidrule(l){6-9}
    & \mcc{Mean} & \mcc{Max} & \mcc{Min} & \mcc{SD}
    & \mcc{Mean} & \mcc{Max} & \mcc{Min} & \mcc{SD}                 \\
    \midrule
\mcl{\textbf{Panel A} : Risk measures}                              \\
    \addlinespace
NPLs            & 3.83  & 14   & 0.18 & 2.01 & 3.14  & 9.64 & 0.17 & 1.84   \\
Z\_Score        & 13.1  & 14.2 & 1.77 & 5.35 & 13.12 & 14.2 & 2.28 & 3.38   \\
    \midrule
\mcl{\textbf{Panel B} : Political Connections}                      \\
  \addlinespace
CEO\_{PC}       & 0.68  & 1  & 0  & 2.4  & 0.38  & 1   & 0   & 0.66 \\
Board\_{ind}    & 0.28  & 14 & 0  & 6.4  & 0.41  & 13  & 0   & 0.25 \\
  \midrule
\mcl{\textbf{Panel C} : Bank Level Variables}                       \\
  \addlinespace
LnTA\tnote{a}   & 10.9  &  12.3     &  9.63     &  0.59 & 11.2  &  13.4 &  8.63 &  0.68 \\
LTQ \tnote{b}   & 37.4  & 364.1     &  9.64     & 41.5  & 31.9  & 508.3 & 11.2  & 32.2  \\
PRF\tnote{c}    & 3.93  &   4.13    &   1.02    &  2.02 &  4.13 &   5.83&  2.12 &  2.53 \\
EFF\tnote{d}    & 36.2  &  56.4     &  16.2     &  23.2 & 25.5  &  68.2 & 17.9  & 19.8  \\
LEV\tnote{e}    & 81.7  &  86.2     &  74.5     &   2.04& 82.4  & 110.2 & 74.64 &  3.32 \\
LG\tnote{f}     & 0.21  &  58.2     &  -1.44    &   1.25&  0.14 &  35.2 &  -1.2 &  1.32 \\
AG\tnote{g}     & 165   & 700       &   0       & 157   & 164   & 513   &   0   & 146   \\
DIV\tnote{h}    & 21.2  & 25.6      &  14.3     &  11.7 &  17.4 &  19.54&  15.8 &  16.4 \\
    \midrule
\mcl{\textbf{Panel D}: Ownership variables}                     \\
  \addlinespace
 MAS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
 ACS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
 \bottomrule
   \end{tabular}
        \medskip
   \begin{tablenotes}
   \footnotesize
   \item[a] Size
  \item[b] Liquidity
  \item[c] Profitability
  \item[d] Efficiency
  \item[e] Leverage
  \item[f] Loan\_growth
  \item[g] Asset\_growth
  \item[h] Diversification
  \end{tablenotes}
\end{threeparttable}
  \end{table}
  \end{document}

答案2

如果您愿意,您可以使用{NiceTabular}nicematrix内置命令\tabularnote

 \documentclass{article}
 \usepackage[margin=2cm,a4paper]{geometry} % set page parameters suitably
 \usepackage{booktabs} % For better looking tables
 \usepackage{tabularx}
\setlength{\parindent}{0pt}
\newcommand{\sym}[1]{#1}
\newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}
\newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}
\usepackage{siunitx} % centering in tables
\sisetup{
detect-mode,
tight-spacing  = true,
group-digits = false ,
input-open-uncertainty  = ,
input-close-uncertainty = ,
table-align-text-post   = false
}
\usepackage{ragged2e}
\usepackage[para,flushleft]{threeparttable}
\renewcommand\TPTtagStyle{\textsf}

\usepackage{enumitem}
\newlist{myitemize}{itemize}{1}
\setlist[myitemize]{noitemsep,left=0pt,label=--}
\usepackage[colorlinks,allcolors=black]{hyperref} 

\newcolumntype{P}{>{\RaggedRight\hspace{0pt}}p{\hsize}}
\newcommand\mytab[1]{\smash{%
\begin{tabular}[t]{@{} P @{}} #1 \end{tabular}}}
\newcommand{\ZScore}{$\mathop{\textnormal{\slshape Z\_Score}}\nolimits$}
\newcommand{\NPLs}{$\mathop{\textnormal{\slshape NPLs}}\nolimits$}  

\usepackage{nicematrix}


\NiceMatrixOptions{notes = { para , style = \textit{\alph{#1} } } }


\begin{document}

\begin{table}[h!]
\caption{Descriptive statistics}
\label{tab1}
\centering
\begin{NiceTabular}{@{}>{\itshape}l*{8}{c}}%
\toprule
Variables & \multicolumn{4}{c}{Domestic BANKS} & \multicolumn{4}{c}{Foreign BANKS} \\ 
\cmidrule(l){2-5} \cmidrule(l){6-9}
& Mean & Max & Min & SD & Mean & Max & Min & SD \\ 
\midrule
\normalfont\rlap{\textbf{Panel A} : Risk measures}\\ 
\addlinespace
\NPLs            & 3.83  & 14   & 0.18 & 2.01 & 3.14  & 9.64 & 0.17 & 1.84\\
\ZScore          & 13.1  & 14.2 & 1.77 & 5.35 & 13.12 & 14.2 & 2.28 & 3.38 \\
\midrule
\normalfont\rlap{\textbf{Panel B} : Political Connections}\\
\addlinespace 
CEO\_{PC}       & 0.68  & 1  & 0  & 2.4  & 0.38  & 1   & 0   & 0.66\\
Board\_{ind}       & 0.28  & 14 & 0  & 6.4  & 0.41  & 13  & 0   & 0.25\\
\midrule
\normalfont\rlap{\textbf{Panel C} : Bank Level Variables}\\ 
\addlinespace              
LnTA\tabularnote{Size}    & 10.9&12.3&9.63&0.59&11.2& 13.4&8.63&0.68\\
LTQ\tabularnote{Liquidity}  & 37.4&364.1&9.64&41.5&31.9&508.3&11.2&   32.2 \\
PRF\tabularnote{Profitability}    & 3.93&  4.13&   1.02&   2.02&   4.13&   5.83&   2.12&   2.53\\
EFF\tabularnote{Efficiency}   & 36.2&  56.4&   16.2&   23.2&   25.5&   68.2&   17.9&   19.8\\
LEV\tabularnote{Leverage}   & 81.7&   86.2&   74.5&   2.04&   82.4&   110.2&74.64 &3.32\\
LG\tabularnote{Loan growth}    & 0.21&   58.2&   -1.44&1.25& 0.14&   35.2&   -1.2&   1.32\\
AG\tabularnote{Assset growth}    & 165  &700&   0   &157&   164 &513&   0   &146\\
DIV\tabularnote{Diversification}  & 21.2& 25.6&   14.3&   11.7&   17.4&   19.54&  15.8&   16.4\\
\midrule
\normalfont\rlap{\textbf{Panel D}: Ownership variables}\\
\addlinespace
MAS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
ACS                   & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
\bottomrule
\end{NiceTabular}
\end{table}
\end{document}

上述代码的输出

相关内容