我有以下等式:
\begin{subequations}
\label{eqn:decanterholdup}
\begin{align}
T & = 0.1\frac{\mu}{S_H - S_L} \\
& = 0.1 \frac{0.856551}{0.999492 - 0.88435} \nonumber\\
& = \SI{0.7439}{\hour}
\end{align}
\end{subequations}
并且结果答案显示为0.743,9
。我怎样才能去掉逗号?另外,我怎样才能使小时显示为常规文本而不是斜体?
相关软件包:
\usepackage{siunitx}
\sisetup{group-minimum-digits = 4, detect-display-math = true, detect-weight, detect-mode = true, math-rm, group-separator = {,} }
\usepackage{amsmath}
答案1
您要的是逗号,所以您明白了。
与数字的排版保持一致。
\documentclass{article}
\usepackage{amsmath,siunitx}
\sisetup{
group-digits=integer, % <--- added
group-minimum-digits = 4,
detect-display-math = true,
detect-weight,
detect-mode = true,
% math-rm, % <--- removed!
group-separator = {,}% <--- not a good choice
}
\begin{document}
\begin{subequations}
\begin{align}
T & = \num{0.1} \frac{\mu}{S_H - S_L} \\
& = \num{0.1} \frac{\num{0.856551}}{\num{0.999492} - \num{0.88435}} \nonumber\\
& = \SI{0.7439}{\hour}
\end{align}
\end{subequations}
\end{document}
请注意,math-rm
如果没有值,则会导致错误的输出(单位将以数学斜体显示)。