答案1
使用tabularx
表格、列siunitx
类型S
和makcell
在两列中写入列标题文本,其中是必要的:
\documentclass{article}
\usepackage{geometry}
\usepackage{iwona} % sans serif
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\newcolumntype{L}{>{\RaggedRight}X}
\usepackage{siunitx}
\begin{document}
\begin{table}[!h]
\sisetup{group-four-digits}
\renewcommand\tabularxcolumn[1]{m{#1}}
\small
\begin{tabularx}{\linewidth}{@{}
L
S[table-format=4.0]
*{4}{S[table-format=9.2]}
@{} }
\toprule
Variables
& {\makecell[b]{No de\\ observaciones}}
& {\makecell[b]{Media}}
& {\makecell[b]{Desviacion\\ Estandar}}
& {\makecell[b]{Minimum}}
& {\makecell[b]{Maximum}} \\
\midrule
Credito Hipotecario
& 3 275 & 30 745 206.66 & 12 148 247.72 & 12 032 977.6 & 51 196 863.91
\\ \addlinespace[2pt]
Depositos en el systema financiero
& 3 275 & 189 825 138.7 & 58 845 344.85 & 99 131 392 & 296 185 499.5
\\ \addlinespace[2pt]
Numbero de noticias de crimen
& 1 050 & 18 636 & 76 038 & 0 & 503
\\ \addlinespace[2pt]
Tasa de referencia BCRP
& 132 & & 11 077 & 5 088 & 26.38
\\ \addlinespace[2pt]
more items
& & & & &
\\ \bottomrule %
\end{tabularx}
\end{table}
\end{document}
我只重写了表的前四行,其他的我留给你了。
答案2
这符合你的要求吗
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\newcommand\mc[1]{\multicolumn{1}{c}{\scriptsize #1}}
\newcolumntype{P}{>{\raggedright\scriptsize}p{4.5cm}}
\newcolumntype{R}{*{5}{>{\scriptsize}c}}
\begin{table}[!h]
\begin{tabular}{@{}P@{\kern-30pt}R@{}}\toprule
\texttt{variables 1}
& \mc{No of observations}
&\mc{Media}
&\mc{Standard Deviation}
&\mc{Maximum}&\mc{Minimum}\\[-2pt]
\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}\cmidrule(lr){5-5} \cmidrule(lr)
{6-6}
introductory payments & 3,275 & 1,23,45,678.23 & 1,23,45,678.23 &
1,23,45,678.23 & 1,23,45,678.23\\
current personnel cost &3,275 & 12,34,56,789.99 &12,34,56,789.99 &12,34,56,789.99 &
12,34,56,789.99 \\
current cost for\newline &1,050 &13.572 &13.572 &13.572 &13.572\\[-8pt]
system maintenance &&&&&\\
\bottomrule %
\end{tabular}
\end{table}
\end{document}