这是我为表格编写的代码,我原本希望 siunitx 能为超过 3 位的数字添加逗号,即 3456 -> 3,456,但事实并非如此,没有小数的数字按原样显示。我尝试了此网站答案中找到的一些代码,对其他人有用,但对我没用。有什么帮助吗?
\usepackage{siunitx}
\sisetup{group-separator={,},group-minimum-digits={3},output-decimal-marker={.}}
\begin{table}
\centerfloat
\caption{Descriptive statistics of Expedia and Tripadvisor datasets.}
\label{tab:stats}
\scalebox{1}{
\begin{tabular}{l S S}
\hline
\multicolumn{1}{c}{Statistics}&\multicolumn{1}{c}{Tripadvisor} &\multicolumn{1}{c} {Expedia} \\
\hline
Total Hotels & 5356 & 3701 \\
[1em]
Average Reviews per Hotel & 68.3 & 154.93 \\
[1em]
Average Review Length & 665.4 & 210.23 \\
[1em]
Average Review Rating & 3.9 & 4.0 \\
[1em]
Average Hotel Review Rating & 3.6 & 3.9 \\
[1em]
Total Responses & 102564 & 13123 \\
[1em]
Average Response per Hotel & 22.3 & 3.9 \\
[1em]
Average Response Length & 397.8 & 251.3 \\
\hline
\end{tabular}
}
\caption*{}
\end{table}
在此处输入代码