![텍스트 너비의 표](https://rvso.com/image/399820/%ED%85%8D%EC%8A%A4%ED%8A%B8%20%EB%84%88%EB%B9%84%EC%9D%98%20%ED%91%9C.png)
테이블을 텍스트 너비에 맞추려면 다음 코드를 사용합니다.
\begin{table}[t]
\small
\caption{Summary descriptive statistics}
\label{tab1:summary_by_affiliation}
\centering{\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} c}
\toprule
\multicolumn{1}{c}{Test 1} & \multicolumn{1}{c}{Test 2} \\
\midrule
Mean & 6.37 \\
Median & 1.00 \\
Std. Dev. & 19.01 \\
Kurtosis & 39.33 \\
Skewness & 5.79 \\
Minimum & 0.09 \\
Maximum & 194.45 \\
Sum & 5845 \\
Count & 917 \\
\bottomrule
\end{tabular*}}
\vspace{-2ex}
\begin{tablenotes}[flushleft]
\footnotesize
\singlespacing
\item\hspace{-2.5pt}\textit{Note}: Test
\end{tablenotes}
\end{table}
결과는 다음과 같습니다.
그러나 내가 실제로 원하는 것은 이것이다(세로 막대 등은 없지만 정렬은 다음과 같아야 함).
답변1
tabular*
환경에서 환경 으로 전환하고 열 유형 대신 열 유형 tabularx
의 중앙 버전을 사용하여 형식 지정 목표를 달성할 수 있습니다 .X
c
환경 이 필요 없을 것 같습니다 tablenotes
.
\documentclass{article}
\usepackage{tabularx,booktabs}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}
\begin{table}[t]
%\small
\caption{Summary descriptive statistics}
\label{tab1:summary_by_affiliation}
\begin{tabularx}{\textwidth}{CC}
\toprule
Test 1 & Test 2 \\
\midrule
Mean & 6.37 \\
Median & 1.00 \\
Std. Dev. & 19.01 \\
Kurtosis & 39.33 \\
Skewness & 5.79 \\
Minimum & 0.09 \\
Maximum & 194.45 \\
Sum & 5845 \\
Count & 917 \\
\bottomrule
\end{tabularx}
\medskip
\footnotesize
\textit{Note}: Test
\end{table}
\end{document}