我怎样才能制作如下所示的表格:
其中第 2 列的值位于第 1 列的值的中心。
答案1
您可以设置每一列tabular
- 它们必须垂直居中,表明输出行是偏移的:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{c c c c}
\toprule
Sample person's data & Cal year & Age & Person-years by stratum \\
\midrule
\begin{tabular}{@{}c@{}}
AAA \\ AAA \\ AAA \\ AAA \\ AAA \\ AAA \\ AAA
\end{tabular} &
\begin{tabular}{@{}c@{}}
BBB \\ BBB \\ BBB \\ BBB \\ BBB \\ BBB
\end{tabular} &
\begin{tabular}{@{}c@{}}
CCC \\ CCC \\ CCC \\ CCC \\ CCC \\ CCC
\end{tabular} &
\begin{tabular}{@{}c@{}}
DDD \\ DDD \\ DDD \\ DDD \\ DDD \\ DDD
\end{tabular} \\
\cmidrule{4-4}
& & & XX
\end{tabular}
\end{document}