我有一张桌子,我想将笔记移到桌子上,对吗?
这可能吗?
表格图片:
特克斯代码:
\begin{table}[htbp]
\thispagestyle{empty}
\vspace*{-1in}\caption{Don't ask}
\begin{threeparttable}
\centering
\hspace*{-1in}\begin{tabular}{p{4.145em}p{4.145em}lp{4.145em}llp{4.145em}ll}
\hline
\multicolumn{3}{p{12.435em}}{$h=1$} & \multicolumn{3}{p{12.435em}}{$h=12$} & \multicolumn{3}{p{12.435em}}{$h=60$} \bigstrut\\
\hline
Ind & $\hat{\lambda}$ & \multicolumn{1}{p{4.145em}}{$R^2$} & Ind & \multicolumn{1}{p{4.145em}}{\hat{\lambda}} & \multicolumn{1}{p{4.145em}}{$\R^2$} & Ind & \multicolumn{1}{p{4.145em}}{\hat{\lambda}} & \multicolumn{1}{p{4.145em}}{$R^2$} \bigstrut\\
\hline
Ag & \textbf{9.82*} & 0.43 & Ag & 1.79 & 0.09 & Agric & -0.23 & 0.03 \bigstrut\\
Frr & \multicolumn{1}{l}{3.09} & 0.1 & Frr & -0.67 & 0.03 & Frr & -0.29 & 0.05 \\
Brr & \multicolumn{1}{l}{5.97} & 0.26 & Brr & 2.23 & 0.2 & Brr & 0.39 & 0.06 \\
\hline
\end{tabular}%
\begin{tablenotes}
\hspace*{-1in}\item{Notes: In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper}
\end{tablenotes}
\end{threeparttable}
\label{tab:addlabel}%
\end{table}%
答案1
据我所知,您正在滥用和误用该threeparttable
机制。首先,您实际上并没有在环境中包含\caption
指令(a 的三个正式部分之一) 。其次,如果您的目标是排版比文本块宽得多的表格,那么您应该采取与您在帖子中展示的方式截然不同的做法。第三,环境的主要目的是排版与指令相关的脚注文本;但是,您的代码不包含任何s。threepartable
threeparttable
tablenotes
\tnote
\tnote
我也不明白为什么使用固定宽度的p
-type 列而不是X
-type 列(由tabularx
包提供)。
以下屏幕截图显示了两个使用tabularx
环境的独立解决方案。第一个使用threeparttable
环境(带有\begin{tablenotes}[flushleft]
);第二个使用不是——从而证明没有必要部署threeparttable
机器来实现格式化目标。
\documentclass{article}
\usepackage{threeparttable,bigstrut}
\usepackage{tabularx}
\begin{document}
\begin{table}[htbp]
\begin{threeparttable}
\caption{Solution with \texttt{threeparttable}}
\label{tab:1}
\begin{tabularx}{\textwidth}{@{} *{9}{X} @{}}
\hline
\multicolumn{3}{@{}l}{$h=1$} &
\multicolumn{3}{l}{$h=12$} &
\multicolumn{3}{l}{$h=60$}\bigstrut\\
\hline
Ind & $\hat{\lambda}$ & $R^2$ &
Ind & $\hat{\lambda}$ & $R^2$ &
Ind & $\hat{\lambda}$ & $R^2$\bigstrut\\
\hline
Ag & \textbf{9.82*} & 0.43 & Ag & 1.79 & 0.09 & Agric & -0.23 & 0.03\bigstrut\\
Frr & 3.09 & 0.1 & Frr & -0.67 & 0.03 & Frr & -0.29 & 0.05 \\
Brr & 5.97 & 0.26 & Brr & 2.23 & 0.2 & Brr & 0.39 & 0.06 \\
\hline
\end{tabularx}
\begin{tablenotes}[flushleft]
\item[]Notes: In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper.
\end{tablenotes}
\end{threeparttable}
\end{table}
\begin{table}[htbp]
\caption{Solution without \texttt{threeparttable}}\label{tab:2}
\smallskip
\begin{tabularx}{\textwidth}{@{} *{9}{X} @{}}
\hline
\multicolumn{3}{@{}l}{$h=1$} &
\multicolumn{3}{l}{$h=12$} &
\multicolumn{3}{l}{$h=60$}\bigstrut\\
\hline
Ind & $\hat{\lambda}$ & $R^2$ &
Ind & $\hat{\lambda}$ & $R^2$ &
Ind & $\hat{\lambda}$ & $R^2$\bigstrut\\
\hline
Ag & \textbf{9.82*} & 0.43 & Ag & 1.79 & 0.09 & Agric & -0.23 & 0.03\bigstrut\\
Frr & 3.09 & 0.1 & Frr & -0.67 & 0.03 & Frr & -0.29 & 0.05 \\
Brr & 5.97 & 0.26 & Brr & 2.23 & 0.2 & Brr & 0.39 & 0.06 \\
\hline
\end{tabularx}
\smallskip
Notes: In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper In this paper in this paper in this paper.
\end{table}
\end{document}