
3 列目の位置合わせがうまくできません。方法をご存知の方はいらっしゃいますか?
\documentclass[a4paper,12pt]{report}
\usepackage{multirow}
\usepackage{siunitx,booktabs}%for table decimals number
\usepackage[export]{adjustbox}
\begin{table}[!htbp]
\centering
\begin{tabular}{>{\bfseries}l S[table-format=-1.2(2)] S[table-format=-1.1e1]}
\toprule
{\textbf{Res.}} & {$\boldsymbol{\beta}$} & {$\boldsymbol{\chi^{2}}$} \\
\midrule
4 & -0.60(14) & 1738 \\
5 & -0.39(11) & 1348\\
6 & -0.32(10) & 612 \\
7 & -0.54(17) & 1159 \\
8a & -0.36(10) & 621 \\
9 & -0.50(14) & 800 \\
10 & -0.26(14) & 544 \\
11a & -0.54(16) & -1140 \\
11b & -0.50(15) & 867 \\
\bottomrule
\end{tabular}
\caption[]{}
\end{table}
答え1
siunitx
コードから数値の書式設定について説明してみます:
table-format=-1.1e1
は、科学的記数法 ( は ) を使用し、小数点 ( ) の前と小数点 ( ) の後に仮数部に符号が付く可能性があることを意味しますe
。指数部はを使用します(exponent
これが形式の部分です)。—
1 digit
1.
1 digit
.1
1 digit
e1
table-format=-1.2(2)
は科学的記数法を使用しませんが、uncertainty part
を使用する があります2 digits
。
したがって、最後のコラムでは、
table-format=-4.0
(— 記号が付く場合があり、小数点部分はない 4 桁の数字)。
答え2
.S[table-format=-1.1e1]
に変更すると、「記号で始まる4桁の数字のための十分なスペースを確保し、数字のためのスペースは確保しない」という意味になります。S[table-format=-4.0]
-4.0
-
後「小数点記号」は不要です(整数を扱っているため)。なぜ設定しますか-4.0
? 3 列目の最大の数値 (絶対値で) が「-1140」だからです。
\documentclass[a4paper,12pt]{report}
\usepackage{bm,siunitx,booktabs}%for table decimals number
\begin{document}
\begin{table}[!htbp]
\centering
\begin{tabular}{>{\bfseries}l
S[table-format=-1.2(2)]
S[table-format=-4.0] }
\toprule
{\textbf{Res.}} & {$\bm{\beta}$} & {$\bm{\chi^{2}}$} \\
\midrule
4 & -0.60(14) & 1738 \\
5 & -0.39(11) & 1348\\
6 & -0.32(10) & 612 \\
7 & -0.54(17) & 1159 \\
8a & -0.36(10) & 621 \\
9 & -0.50(14) & 800 \\
10 & -0.26(14) & 544 \\
11a & -0.54(16) & -1140 \\
11b & -0.50(15) & 867 \\
\bottomrule
\end{tabular}
\caption[]{}
\end{table}
\end{document}