表格标题比表格长

表格标题比表格长

请问我怎样才能使表格标题与表格长度一致?

\begin{table}[ht]
\caption{Empirical Model Results}
\centering
\begin{tabular}{l c c c c} 
\hline\hline 
& \multicolumn{4}{c}{Model} \\
 & 1 & 2 & 3 & 4 \\ [0.5ex]
\hline
Interest & -3.58$^\ddagger$ & -.50 & -3.44$^\ddagger$ & -.44$^\nmid$ \\ 
 & (.37) & (.54) & (.20) & (.25)  \\[1ex]
Lagged Rainfall & -.06$^\ddagger$  & -.07$^\ddagger$ & -.01 & -.01$^\dagger$\\
 & (.009) & (.008) & (.007) & (.005) \\ [1ex]
Yearend & 3.58$^\dagger$ & 3.72$^\dagger$ & 4.23$^\ddagger$ & 4.37$^\ddagger$ \\
& (1.67) & (1.53) & (1.13) & (.91) \\[1ex]
State Fixed Effects & No & No & Yes & Yes \\[1ex]
Time Fixed Effects & No & Yes & No & Yes \\ [1ex]
$\bar{R^2}$ & .16 & .31 & .62 & .77 \\[1ex] 
\hline
\end{tabular}
 \centering 
 \caption*{
    \footnotesize Note: $\nmid$, $\dagger$ and $\ddagger$ denote significance at .1, .05 and .01 levels respectively. Standard errors presented in paratheses}

答案1

您应该使用threeparttable来做这样的事。

% arara: pdflatex

\documentclass{article}
\usepackage{amssymb}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{siunitx}

\begin{document}
\begin{table}[ht]
    \caption{Empirical Model Results}
    \centering
    \begin{threeparttable}
    \begin{tabular}{lcccc}\toprule
        & \multicolumn{4}{c}{Model} \\
        & 1 & 2 & 3 & 4 \\\midrule
        Interest & $-3.58^\ddagger$ & $-.50$ & $-3.44^\ddagger$ & $-.44^\nmid$ \\ 
        & $(.37)$ & $(.54)$ & $(.20)$ & $(.25)$ \\\addlinespace
        Lagged Rainfall & $-.06^\ddagger$  & $-.07^\ddagger$ & $-.01$ & $-.01^\dagger$\\
        & $(.009)$ & $(.008)$ & $(.007)$ & $(.005)$ \\\addlinespace
        Yearend & $3.58^\dagger$ & $3.72^\dagger$ & $4.23^\ddagger$ & $4.37^\ddagger$ \\
        & $(1.67)$ & $(1.53)$ & $(1.13)$ & $(.91)$ \\\addlinespace
        State Fixed Effects & No & No & Yes & Yes \\
        Time Fixed Effects & No & Yes & No & Yes \\
        $\bar{R^2}$ & $.16$ & $.31$ & $.62$ & $.77$ \\\bottomrule
    \end{tabular}
    \begin{tablenotes}
        \item[$\nmid,\dagger,\ddagger$] Significance at \numlist[add-integer-zero=false]{.1;.05;.01} levels respectively. Standard errors presented in parantheses
    \end{tablenotes}
    \end{threeparttable}
    \end{table}
\end{document}

在此处输入图片描述

答案2

解决方案如下:(a) 使用tabularx包创建一个具有预先指定宽度(的0.77\textwidth)的表格,(b) 使用列说明符\multicolumn{5}{p{0.77\textwidth}}来排版表格注释。p如果需要,(“段落”)列会自动将文本换行到多行。

此外,该解决方案使用该dcolumn包将数字的小数点对齐,并使用该booktabs包创建间距适当的水平线。

在此处输入图片描述

\documentclass{article}
\usepackage{caption,amssymb,tabularx,dcolumn,booktabs}
\newcolumntype{d}[1]{D{.}{.}{#1}} % "decimal alignment" column type
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % shortcut macro
\begin{document}
\begin{table}[ht]
\caption{Empirical Model Results}
\centering
\begin{tabularx}{0.77\textwidth}{@{} X *{4}{d{2.4}} @{}} 
\toprule
& \multicolumn{4}{c@{}}{Model} \\
\cmidrule(l){2-5}
 & \mc{1} & \mc{2} & \mc{3} & \mc{4} \\
\midrule
Interest & -3.58^\ddagger & -.50 & -3.44^\ddagger & -.44^\nmid \\ 
 & (.37) & (.54) & (.20) & (.25)  \\[1ex]
Lagged Rainfall & -.06^\ddagger  & -.07^\ddagger & -.01 & -.01^\dagger\\
 & (.009) & (.008) & (.007) & (.005) \\[1ex]
Yearend & 3.58^\dagger & 3.72^\dagger & 4.23^\ddagger & 4.37^\ddagger \\
& (1.67) & (1.53) & (1.13) & (.91) \\[1ex]
State Fixed Effects & \mc{No} & \mc{No} & \mc{Yes} & \mc{Yes} \\
Time Fixed Effects & \mc{No} & \mc{Yes} & \mc{No} & \mc{Yes} \\
$\bar{R}^2$ & .16 & .31 & .62 & .77 \\ 
\midrule[\heavyrulewidth]
\multicolumn{5}{@{}p{0.77\textwidth}@{}}{\footnotesize Note: $\nmid$, $\dagger$ and $\ddagger$ denote 
significance at .1, .05 and .01 levels respectively. Standard errors presented in}\\
\end{tabularx}
\end{table}
\end{document}

相关内容