![Tabla en ancho de texto](https://rvso.com/image/399820/Tabla%20en%20ancho%20de%20texto.png)
Cuando quiero ajustar la tabla al ancho del texto, uso el siguiente código:
\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}
El resultado es el siguiente:
Pero lo que realmente quiero es esto (sin las barras verticales, etc., pero la alineación debería verse así:
Respuesta1
Puede lograr su objetivo de formato cambiando de un entorno tabular*
a otro tabularx
y empleando una versión centrada del X
tipo de columna en lugar del c
tipo de columna.
No parece haber necesidad de un tablenotes
entorno.
\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}