当我尝试将表格的第二列与(第一个或第二个)小数点对齐时,空格意外被删除。我该如何保留“F(XXX, XXX) = XXX”中的空格?
使用等号(=)对齐列对我来说也是件好事。
谢谢!
\documentclass{report}
\usepackage{tgheros}
\usepackage{array}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{
detect-all,
detect-mode,
group-separator = {},
group-four-digits = true,
tight-spacing = true,
input-signs = ,
input-symbols = ,
input-open-uncertainty = ,
input-close-uncertainty = ,
table-align-text-pre = false,
table-align-text-post = false,
table-space-text-pre = {(},
table-space-text-post = {)},
input-decimal-markers = {.},
table-number-alignment = right
}
\usepackage[font = {sf, bf}, labelsep = period]{caption}
\usepackage{floatrow}
\DeclareFloatFont{tablefont}{\sffamily\footnotesize}
\floatsetup[table]{font = tablefont, capposition = top}
\floatsetup[figure]{font = tablefont}
\begin{document}
\begin{table}
\caption{Test}
\begin{tabular}{lS}
\toprule
AAA & F(2, 304.20) = 6.85 \\
BBB & F(2, 477.27) = 6.41 \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
答案1
我认为将测试类型(这里是某种 F 检验,对吧?)和测试统计量的值塞进同一列中并不是一个好主意。采用这种方法对读者肯定没有任何好处。
我建议您使用两列,并且S
仅将列类型用于测试统计数据。
\documentclass{report}
\usepackage{tgheros}
\usepackage{array}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{
detect-all,
%detect-mode,
group-separator = {},
group-four-digits = true,
tight-spacing = true,
input-signs = ,
input-symbols = ,
input-open-uncertainty = ,
input-close-uncertainty = ,
table-align-text-pre = false,
table-align-text-post = false,
table-space-text-pre = {(},
table-space-text-post = {)},
input-decimal-markers = {.},
table-number-alignment = right
}
\usepackage[font = {sf, bf}, labelsep = period]{caption}
\usepackage{floatrow}
\DeclareFloatFont{tablefont}{\sffamily\footnotesize}
\floatsetup[table]{font = tablefont, capposition = top}
\floatsetup[figure]{font = tablefont}
\begin{document}
\begin{table}
\caption{Test}
\centering
\begin{tabular}{@{} ll S[table-format=1.2] @{}}
\toprule
AAA & F(2, 304.20) & 6.85 \\
BBB & F(2, 477.27) & 6.41 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}