在多页长表内创建多个面板

在多页长表内创建多个面板

我能够使用表格环境在普通表中创建多个面板。我还需要每个面板的描述。最后一个面板的脚注用作整个表的脚注。下面是 MWE 使用table包。我想找到相同的使用longtable包。MWE 中的表比我实际的项目小得多。理想情况下,我需要每页一个面板。

我也无法证明面板 A (下图) 位于中心。

编辑(23/05/21):此处的示例展示了如何在 longtable 中创建多个面板。需要使用xltabular包。链接:https://www.overleaf.com/read/mysjtbnfmypz

下面的 MWE 可在背面找到:https://www.overleaf.com/read/kxmrshgmgcpb

\documentclass[12pt]{article}
\usepackage{float}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{float}
\usepackage{pdflscape}
\usepackage{threeparttable}
\usepackage{threeparttablex}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage[top=0.5in,bottom=0.5in,right=0.5in,left=0.5in]{geometry}


\begin{document}


\newgeometry{margin=0.5in}
\begin{landscape}

\begin{table}

\caption[Robustness Results]{\textbf{Robustness Regressions: Different measures of disagreement and turnover, and five-year subperiods}}\label{tab:mytab}

\begin{threeparttable}
\phantom{ }\\
\textbf{Panel A: Different Measures of Disagreement}\\
Describe Panel A


\centering\fontsize{8}{10}\selectfont

\begin{tabular}{>{\raggedright\arraybackslash}p{6.4cm}>{\raggedright\arraybackslash}p{3.2cm}>{\raggedright\arraybackslash}p{3.2cm}>{\raggedright\arraybackslash}p{3.2cm}>{\raggedright\arraybackslash}p{3.2cm}>{}p{3.2cm}}
\toprule
\multicolumn{1}{c}{ } & \multicolumn{4}{c}{$L\_TURN_t$} \\
\cmidrule(l{3pt}r{3pt}){2-5}
$FDISP_{t-1}$ & $\phantom{-}0.017$* & $\phantom{-}0.018$* & $\phantom{-}0.017$* & $\phantom{-}0.015$\\
 & \phantom{-}($0.009$) & \phantom{-}($0.009$) & \phantom{-}($0.009$) & \phantom{-}($0.009$)\\
\midrule
$\% \: R^2 \: \textrm{Explained}$ & $\phantom{-}3.940$ & $\phantom{-}3.530$ & $\phantom{-}4.290$ & $\phantom{-}7.580$\\
$\textrm{Observations}$ & \phantom{-}111,298 & \phantom{-}111,298 & \phantom{-}111,298 & \phantom{-}111,298\\
\bottomrule
\end{tabular}



\begin{tablenotes}
\item Panel A notes\\
\end{tablenotes}
\end{threeparttable}
\pagebreak

\begin{threeparttable}
\phantom{ }\\
\textbf{Panel B: Different Measures of Turnover}\\
Describe Panel B


\centering\fontsize{8}{10}\selectfont

\begin{tabular}{>{\raggedright\arraybackslash}p{5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}>{\raggedright\arraybackslash}p{2.5cm}}
\toprule
\multicolumn{1}{c}{ } & \multicolumn{1}{c}{$L\_TURN_t$} & \multicolumn{1}{c}{$\Delta L\_TURN_t$} & \multicolumn{1}{c}{$L\_TURN\_GRT_t$} & \multicolumn{1}{c}{$L\_TURN\_D_t$} & \multicolumn{1}{c}{$L\_TURN\_ILLIQ_t$} & \multicolumn{1}{c}{$VW\_L\_TURN_t$} & \multicolumn{1}{c}{$EW\_L\_TURN_t$} \\
\cmidrule(l{3pt}r{3pt}){2-2} \cmidrule(l{3pt}r{3pt}){3-3} \cmidrule(l{3pt}r{3pt}){4-4} \cmidrule(l{3pt}r{3pt}){5-5} \cmidrule(l{3pt}r{3pt}){6-6} \cmidrule(l{3pt}r{3pt}){7-7} \cmidrule(l{3pt}r{3pt}){8-8}
$FDISP_{t-1}$ & $\phantom{-}0.019$*** & $-0.004$*** & $\phantom{-}0.030$*** & $-0.010$** & $\phantom{-}0.008$** & $-0.014$*** & $-0.013$***\\
 & \phantom{-}($0.007$) & \phantom{-}($0.001$) & \phantom{-}($0.007$) & \phantom{-}($0.004$) & \phantom{-}($0.003$) & \phantom{-}($0.004$) & \phantom{-}($0.004$)\\
\midrule
$\% \: R^2 \: \textrm{Explained}$ & $\phantom{-}5.030$ & $\phantom{-}0.000$ & $\phantom{-}1.710$ & $\phantom{-}0.550$ & $\phantom{-}0.070$ & $\phantom{-}0.630$ & $\phantom{-}0.680$\\
$\textrm{Observations}$ & \phantom{-}657,714 & \phantom{-}657,714 & \phantom{-}657,714 & \phantom{-}657,714 & \phantom{-}657,714 & \phantom{-}657,714 & \phantom{-}657,714\\
\bottomrule
\end{tabular}



\begin{tablenotes}
\item Panel B notes\\
\end{tablenotes}
\end{threeparttable}
\pagebreak

\begin{threeparttable}
\phantom{ }\\
\textbf{Panel C: Five-year subperiods}\\
Describe Panel C


\centering\fontsize{8}{10}\selectfont

\begin{tabular}{>{\raggedright\arraybackslash}p{4.1cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}>{\raggedright\arraybackslash}p{2cm}}
\toprule
\multicolumn{1}{c}{ } & \multicolumn{9}{c}{$L\_TURN_t$} \\
\cmidrule(l{3pt}r{3pt}){2-10}
\multicolumn{1}{l}{\em{ }} & \multicolumn{1}{l}{\em{1976-1979}} & \multicolumn{1}{l}{\em{1980-1984}} & \multicolumn{1}{l}{\em{1985-1989}} & \multicolumn{1}{l}{\em{1990-1994}} & \multicolumn{1}{l}{\em{1995-1999}} & \multicolumn{1}{l}{\em{2000-2004}} & \multicolumn{1}{l}{\em{2005-2009}} & \multicolumn{1}{l}{\em{2010-2014}} & \multicolumn{1}{l}{\em{2015-2019}} \\
\cmidrule(l{3pt}r{3pt}){2-2} \cmidrule(l{3pt}r{3pt}){3-3} \cmidrule(l{3pt}r{3pt}){4-4} \cmidrule(l{3pt}r{3pt}){5-5} \cmidrule(l{3pt}r{3pt}){6-6} \cmidrule(l{3pt}r{3pt}){7-7} \cmidrule(l{3pt}r{3pt}){8-8} \cmidrule(l{3pt}r{3pt}){9-9} \cmidrule(l{3pt}r{3pt}){10-10}
$FDISP_{t-1}$ & $\phantom{-}0.030$ & $\phantom{-}0.011$ & $\phantom{-}0.022$ & $\phantom{-}0.018$ & $\phantom{-}0.007$ & $\phantom{-}0.011$ & $\phantom{-}0.048$*** & $-0.008$ & $\phantom{-}0.004$\\
 & \phantom{-}($0.140$) & \phantom{-}($0.017$) & \phantom{-}($0.015$) & \phantom{-}($0.016$) & \phantom{-}($0.015$) & \phantom{-}($0.015$) & \phantom{-}($0.013$) & \phantom{-}($0.014$) & \phantom{-}($0.017$)\\
\midrule
$\% \: R^2 \: \textrm{Explained}$ & $\phantom{-}1.560$ & $\phantom{-}1.640$ & $\phantom{-}1.320$ & $\phantom{-}3.400$ & $\phantom{-}5.030$ & $\phantom{-}3.170$ & $\phantom{-}2.520$ & $\phantom{-}1.800$ & $\phantom{-}1.340$\\
$\textrm{Observations}$ & \phantom{-}7,739 & \phantom{-}16,837 & \phantom{-}46,959 & \phantom{-}74,342 & \phantom{-}95,145 & \phantom{-}106,543 & \phantom{-}111,811 & \phantom{-}111,133 & \phantom{-}91,082\\
\bottomrule
\end{tabular}



\begin{tablenotes}
\item In Panel A, log turnover is regressed on set of controls and several measures of disagreement. In Panel B, several measures of turnover are regressed on a set of explanatory variables and the disagreement measure $STD\_DEV$. In Panel C, log turnover regressed on set of controls and disagreement over nine 5-year subperiods. All independent variables are one month lagged variables. Definitions of all the variables appears in Appendix \ref{appendix-a2-variable-definitions}. All regression specifications have industry and year fixed effects. Within $R^2$ is the $R^2$ for within groups variation with fixed effects projected out while Adj. $R^2$ is for the entire model. \% $R^2$ explained is the percent of unexplained variation explained by including disagreement in the regression. Standard errors are double clustered by firm and year-month. Statistical significance of 10\%, 5\% and 1\% are indicated by *, ** and *** respectively.
\end{tablenotes}
\end{threeparttable}

\end{table}
\end{landscape}
\restoregeometry

\end{document}

答案1

目前并不完全清楚您想要获得什么,因此以下 MWE 基于猜测。

清理代码后,可能的 MWE 是:

\documentclass[12pt]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[skip=1ex, font=bf]{caption}
\usepackage{subcaption}
\usepackage{booktabs, tabularx}
\usepackage[referable]{threeparttablex}
\usepackage{pdflscape}
\usepackage{siunitx}
\NewExpandableDocumentCommand\mc{O{1}m}{\multicolumn{#1}{c}{#2}}

\usepackage{lipsum}
\begin{document}
    \begin{landscape}
\sisetup{input-open-uncertainty= ,  % <-- new
         input-close-uncertainty= , % <-- new
         table-space-text-pre=(,    % <-- new
         table-space-text-post=),   % <-- new
         table-align-text-pre=false,% <-- new
         table-format=3.3}

    \begin{table}[ht]
\caption[Robustness Results]{Robustness Regressions: Different measures of disagreement and turnover, and five-year subperiods}
\label{tab:mytab}

\begin{threeparttable}
\caption*{Panel A: Different Measures of Disagreement}
\begin{tabularx}{0.5\linewidth}{X *{4}{S}}
\multicolumn{5}{p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth}}{Describe Panel B. \lipsum[66]}\\
    \toprule
    &   \mc[4]{$L\_TURN_t$} \\
    \cmidrule(lr){2-5}
$FDISP_{t-1}$ 
    &  0.017\tnote{*}   &  0.018\tnote{*}   &  0.017\tnote{*}   &  0.015    \\
    & (0.009)           & (0.009)           & (0.009)           & (0.009)   \\
    \midrule
\% $R^2$ Explained      
    & 3.940             & 3.530             & 4.290             & 7.580     \\
Observations
    & {111,298}         & {111,298}         & {111,298}         & {111,298} \\
\bottomrule
\end{tabularx}
\begin{tablenotes}[flushleft]\footnotesize
\note{Panel A notes}
\end{tablenotes}
\end{threeparttable}
\end{table}

\clearpage
\begin{threeparttable}
\caption*{Panel B: Different Measures of Turnover}
\begin{tabularx}{\linewidth}{X *{7}{S}}
\multicolumn{8}{p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth}}{Describe Panel C. \lipsum[66]}\\
    \toprule
    & \mc[7]{$L\_TURN_t$} \\
    \cmidrule{2-8}
    & \mc{$L\_TURN_t$}      & \mc{$\Delta L\_TURN_t$} & \mc{$L\_TURN\_GRT_t$} 
    & \mc{$L\_TURN\_D_t$}   & \mc{$L\_TURN\_ILLIQ_t$} & \mc{$VW\_L\_TURN_t$}  
    & \mc{$EW\_L\_TURN_t$} \\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5} \cmidrule(lr){6-6} \cmidrule(lr){7-7} \cmidrule(lr){8-8}
$FDISP_{t-1}$ 
    & 0.019\tnote{***}  & -0.004\tnote{***} & 0.030\tnote{***} & -0.010\tnote{**}
    & 0.008\tnote{**}   & -0.014\tnote{***} & -0.013\tnote{***}  \\
    & (0.007)           & (0.001)           & (0.007)           & (0.004)
    & (0.003)           & (0.004)           & (0.004)           \\
    \midrule
\% $R^2$ Explained
    & 5.030     & 0.000     & 1.710     & 0.550 & 0.070 & 0.630 & 0.680 \\
Observations
    & {657,714} & {657,714} & {657,714} & {657,714} & {657,714} & {657,714} & {657,714}\\
    \bottomrule
\end{tabularx}
\begin{tablenotes}[flushleft]\footnotesize
\note{Panel B notes}
\end{tablenotes}
\end{threeparttable}

\clearpage
\begin{threeparttable}
\caption*{Panel C: Five-year subperiods}
\begin{tabularx}{\linewidth}{X *{9}{S[table-format=1.3]} }
\multicolumn{10}{p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth}}{Describe Panel C}\\
\toprule
    & \mc[9]{$L\_TURN_t$} \\
    \cmidrule{2-10}
    & \mc{\em{1976-1979}} & \mc{\em{1980-1984}} & \mc{\em{1985-1989}}
    & \mc{\em{1990-1994}} & \mc{\em{1995-1999}} & \mc{\em{2000-2004}}
    & \mc{\em{2005-2009}} & \mc{\em{2010-2014}} & \mc{\em{2015-2019}} \\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5} \cmidrule(lr){6-6} \cmidrule(lr){7-7} \cmidrule(lr){8-8} \cmidrule(lr){9-9} \cmidrule(lr){10-10}
$FDISP_{t-1}$
    &  0.030  &  0.011   &  0.022   &  0.018   &  0.007 &  0.011
    &  0.048\tnote{***}  & -0.008   &  0.004 \\
    & (0.140) & (0.017)  & (0.015)  & (0.016) & (0.015) & (0.015)
    & (0.013) & (0.014)     & (0.017)\\
\midrule
\% $R^2$ Explained
    & 1.560     & 1.640     & 1.320     & 3.400     & 5.030
    & 3.170     & 2.520     & 1.800     & 1.340 \\
Observations
    & {7,739}   & {16,837}  & {46,959}  & {74,342}  & {95,145}
    & {106,543} & {111,811} & {111,133} & {91,082}\\
    \bottomrule
\end{tabularx}
\begin{tablenotes}[para, flushleft]\footnotesize
\note{In Panel A, log turnover is regressed on set of controls and several measures of disagreement. In Panel B, several measures of turnover are regressed on a set of explanatory variables and the disagreement measure $STD\_DEV$. In Panel C, log turnover regressed on set of controls and disagreement over nine 5-year subperiods. All independent variables are one month lagged variables. Definitions of all the variables appears in Appendix \ref{appendix-a2-variable-definitions}. All regression specifications have industry and year fixed effects. Within $R^2$ is the $R^2$ for within groups variation with fixed effects projected out while Adj. $R^2$ is for the entire model. \% $R^2$ explained is the percent of unexplained variation explained by including disagreement in the regression. Standard errors are double clustered by firm and year-month.

Statistical significance of 10\%, 5\% and 1\% are indicated by *, ** and *** respectively.}
\end{tablenotes}
\end{threeparttable}

\end{landscape}

\end{document}

最后一页的图片:

在此处输入图片描述

相关内容