我怎样才能使所有列与 tabularX 具有相同的宽度?

我怎样才能使所有列与 tabularX 具有相同的宽度?

我想制作一个列宽相等的表格。当我写文本时,我希望文本垂直排列,但是我似乎无法使用 tabularx 包使最后一列的行为与其他列相同。以下是代码:

\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}[input-decimal-markers=.]
\usepackage{lipsum}


\begin{table}[t]
\begin{adjustbox}{width=1.2\textwidth,center=\textwidth}
\renewcommand{\arraystretch}{2} 
\tiny
\begin{tabularx}{\textwidth}{@{}XXXXXs{}} 
    \toprule
    \multicolumn{1}{l}{Study}&\multicolumn{1}{l}{Design}&\multicolumn{1}{c}{Data source}&\multicolumn{1}{c}{Algorithms used }&\multicolumn{1}{c}{Findings}&\multicolumn{1}{r}{Limitations}\\
    \midrule
    Malone et al. (2007)25
    Cross-sectional
    study &Test of a really long description which should itself span many rows, in fact occupying much space, hopefully, causing it to span a couple of normal rows &test123?&0.3928&Test of a really long description which should itself span many rows, in fact occupying much spac?& test \\
    Age&Test of a really long description which should itself span many rows, in fact occupying much space, hopefully, causing it to span a couple of normal rows & 49.16&15.82&test&test\\
    \bottomrule
\end{tabularx}
\end{adjustbox}
\end{table}

下表为该表的图片: 在此处输入图片描述

为什么我无法让最后一列使用 tabularx 中的 X 参数,而是限制为 s?有人能帮忙吗?提前致谢。

答案1

如果您希望第六列和最后一列具有与前五列相同的宽度,请将其类型从 更改sX

\begin{tabularx}{\textwidth}{@{}XXXXXX@{}}    
...
\end{tabularx}

相关内容