【发布时间】:2020-07-04 15:13:54
【问题描述】:
我想将每个括号及其内容移动到每个单元格中的新行,以创建更多空间。有没有聪明的方法来做到这一点?
\begin{table}[ht]
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{lrrrrrrrrrrrrrr}
\toprule
& 2007 (N=2571) & 2008 (N=4888) & 2009 (N=6856) & 2010 (N=8669) & 2011 (N=9812) & 2012 (N=10734) & 2013 (N=13582) & 2014 (N=14500) & 2015 (N=14529) & 2016 (N=13739) & 2017 (N=12178) & 2018 (N=9525) & NULL (N=228) & Total (N=121811) \\
\midrule
Sex & & & & & & & & & & & & & & \\
- Male & 1410 (54.8\%) & 2538 (51.9\%) & 3537 (51.6\%) & 4514 (52.1\%) & 5015 (51.1\%) & 5564 (51.8\%) & 7241 (53.3\%) & 7970 (55.0\%) & 8195 (56.4\%) & 7861 (57.2\%) & 7091 (58.2\%) & 5572 (58.5\%) & 129 (56.6\%) & 66637 (54.7\%) \\
- Female & 1150 (44.7\%) & 2283 (46.7\%) & 3219 (47.0\%) & 4103 (47.3\%) & 4795 (48.9\%) & 5169 (48.2\%) & 6340 (46.7\%) & 6530 (45.0\%) & 6334 (43.6\%) & 5878 (42.8\%) & 5087 (41.8\%) & 3953 (41.5\%) & 91 (39.9\%) & 54932 (45.1\%) \\
- NULL & 11 (0.4\%) & 67 (1.4\%) & 100 (1.5\%) & 52 (0.6\%) & 2 (0.0\%) & 1 (0.0\%) & 1 (0.0\%) & 0 (0.0\%) & 0 (0.0\%) & 0 (0.0\%) & 0 (0.0\%) & 0 (0.0\%) & 8 (3.5\%) & 242 (0.2\%) \\
AgeBin & & & & & & & & & & & & & & \\
- 0to4 & 31 (1.2\%) & 42 (0.9\%) & 64 (0.9\%) & 98 (1.1\%) & 88 (0.9\%) & 161 (1.5\%) & 119 (0.9\%) & 149 (1.0\%) & 154 (1.1\%) & 143 (1.0\%) & 174 (1.4\%) & 153 (1.6\%) & 3 (1.3\%) & 1379 (1.1\%) \\
\bottomrule
\end{tabular}
}
\end{table}
【问题讨论】:
-
你能发一个minimal reproducible example吗?您可能正在寻找固定宽度的列,例如
p{...}或tabularx包
标签: count latex break percentage xtable