표 캡션을 표 길이로 만들려면 어떻게 해야 합니까?
\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
그런 일에는 a를 사용해야합니다 .
% 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
tabularx
다음은 (a) 패키지를 사용하여 미리 지정된 너비(의 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}