
세 번째 열 정렬을 제대로 할 수 없습니다. 방법을 아시는 분 계시나요?
\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
is for ) 을 사용한다는 의미입니다 . 지수 사용 ( 형식의 일부)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]
로 변경 S[table-format=-4.0]
. -4.0
의미: "기호 앞에 오는 4자리 숫자를 위한 충분한 공간을 확보 -
하고 숫자를 위한 공간은 따로 확보하지 마십시오.~ 후에소수점 표시"(정수를 다루기 때문에).왜세트 -4.0
? 세 번째 열의 가장 큰 숫자(절대값 기준)가 '-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}