使用 threeparttable 包制作表格后,使用 sidewaystable 包制作的表格的 tablenote 完全乱了。例如,请参见下面的图片
有人知道如何让侧边表的表格注释覆盖整个表格吗?下面给出了一些工作示例代码:
\documentclass[a4paper, 12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{comment}
\usepackage{hanging}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm,marginparwidth=1.5cm]{geometry}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{newfloat}
\usepackage{rotating}
\usepackage{threeparttable}
\usepackage{tabularx}
\usepackage{adjustbox}
\usepackage{float}
\begin{document}
\begin{table}[H]
\centering
\caption{This is the caption of table 1}
\begin{tablenotes}[flushleft]
\small\setlength{\extrarowheight}{1.5pt}
\item Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla
\end{tablenotes}
%\ra{1}
\begin{adjustbox}{max width=\textwidth}
\begin{threeparttable}
\centering
\resizebox{\textwidth}{!}{\begin{tabular}{l c c c}
\toprule
Panel A \\
\midrule
& Entire Sample & Advisory & Execution Only \\
\midrule
Row 1 & 0 & 0& 0 \\
Row2 & 0 & 0& 0 \\
Row3 & 0 & 0& 0 \\
Row4 & 0 & 0& 0 \\
Row4 & 0 & 0& 0 \\
\end{tabular}}
\resizebox{\textwidth}{!}{\begin{tabular}{l c c c c c c }
\toprule
Panel B \\
\midrule
& S1 & S2 & S3 & S4 & S5 & H-L \\
\midrule
Row1 &0000 &0000 &0000 & 0000 &0000 & 0000\\
Row2&0000 &0000 &0000 & 0000 &0000 & 0000\\
Row3&0000 &0000 &0000 & 0000 &0000 & 0000\\
Row4 &0000 &0000 &0000 & 0000 &0000 & 0000\\
Row4 &0000 &0000 &0000 & 0000 &0000 & 0000\\
\\
\hline
Panel C \\
\midrule
& S1 & S2 & S3 & S4 & S5 & H-L \\
\midrule
Row1 &0000 &0000 &0000 & 0000 &0000 & 0000\\
Row2&0000 &0000 &0000 & 0000 &0000 & 0000\\
Row3 &0000 &0000 &0000 & 0000 &0000 & 0000\\
Row4 &0000 &0000 &0000 & 0000 &0000 & 0000\\
Row4 &0000 &0000 &0000 & 0000 &0000 & 0000\\
\bottomrule
\end{tabular}}
\end{threeparttable}\label{tab:1}
\end{adjustbox}
\end{table}
\begin{sidewaystable}[ht]
\setlength{\extrarowheight}{3pt}
\centering
\caption{This is the caption of table 2}
\begin{tablenotes}[flushleft]
\footnotesize\setlength{\extrarowheight}{1.5pt}\item Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla
\end{tablenotes}
%\ra{1}
\setlength{\tabcolsep}{4.5pt}
\resizebox{\textwidth}{!}{\begin{tabular}{l c c c c c c c c c c c c c c c c c c c c}
\toprule
Event & \multicolumn{2}{c}{From 1 to 2} & \multicolumn{2}{c}{From 2 to 3} & \multicolumn{2}{c}{From 3 to 4} & \multicolumn{2}{c}{From 4 to 5} & \multicolumn{2}{c}{From 5 to 4} & \multicolumn{2}{c}{From 4 to 3} & \multicolumn{2}{c}{From 3 to 2} & \multicolumn{2}{c}{From 2 to 1} & \multicolumn{2}{c}{UP} & \multicolumn{2}{c}{DOWN} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9} \cmidrule(lr){10-11} \cmidrule(lr){12-13} \cmidrule(lr){14-15} \cmidrule(lr){16-17} \cmidrule(lr){18-19} \cmidrule(lr){20-21}
month & $\overline{\text{CSAF}}_t$ & $t$-value & $\overline{\text{CSAF}}_t$ & $t$-value &$\overline{\text{CSAF}}_t$ & $t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value& $\overline{\text{CSAF}}_t$ &$t$-value & $\overline{\text{CSAF}}_t$ &$t$-value& $\overline{\text{CSAF}}_t$ &$t$-value \\ \midrule
& &\multicolumn{3}{l}{Panel A}\\
\addlinespace[1ex]
\hline
1 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
2 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
3 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
4& 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
5 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
6 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
\\
\hline
\addlinespace[1ex]
& &\multicolumn{3}{l}{ Panel B}\\
\addlinespace[1ex]
\hline
1 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
2 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
3 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
4 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
5 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
6 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
\\
\bottomrule
\end{tabular}
}
\label{tab:2}
\end{sidewaystable}
\end{document}
答案1
以下内容可能更接近您想要实现的目标:
\documentclass[a4paper, 12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{comment}
\usepackage{hanging}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm,marginparwidth=1.5cm]{geometry}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{newfloat}
\usepackage{rotating}
\usepackage{threeparttable}
\usepackage{tabularx}
\usepackage{adjustbox}
\usepackage{float}
\begin{document}
\begin{sidewaystable}[ht]
\setlength{\extrarowheight}{3pt}
\caption{This is the caption of table 2}
Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla
\medskip
\centering
\scriptsize
\setlength{\tabcolsep}{3.75pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l *{20}{c}}
\toprule
Event & \multicolumn{2}{c}{From 1 to 2} & \multicolumn{2}{c}{From 2 to 3} & \multicolumn{2}{c}{From 3 to 4} & \multicolumn{2}{c}{From 4 to 5} & \multicolumn{2}{c}{From 5 to 4} & \multicolumn{2}{c}{From 4 to 3} & \multicolumn{2}{c}{From 3 to 2} & \multicolumn{2}{c}{From 2 to 1} & \multicolumn{2}{c}{UP} & \multicolumn{2}{c}{DOWN} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9} \cmidrule(lr){10-11} \cmidrule(lr){12-13} \cmidrule(lr){14-15} \cmidrule(lr){16-17} \cmidrule(lr){18-19} \cmidrule(lr){20-21}
month & $\overline{\text{CSAF}}_t$ & $t$-value & $\overline{\text{CSAF}}_t$ & $t$-value &$\overline{\text{CSAF}}_t$ & $t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value &$\overline{\text{CSAF}}_t$ &$t$-value& $\overline{\text{CSAF}}_t$ &$t$-value & $\overline{\text{CSAF}}_t$ &$t$-value& $\overline{\text{CSAF}}_t$ &$t$-value \\ \midrule
& &\multicolumn{3}{l}{Panel A}\\
\addlinespace[1ex]
\hline
1 & 0 & 0 & 0 & 0 & 0&0 & 0 & 0 &0 & 0 & 0& 0 & 0 & 0 & 0 & 0 &0 & 0 & 0 &0 \\
2 & 0 & 0 & 0 & 0 &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