在這個mwe中,第一個小數位分隔符號不是粗體,如何解決這個問題?
\documentclass{article}
\usepackage{siunitx}
\sisetup{
unit-mode = text,
locale=FR,
detect-all,
inter-unit-product = \ensuremath{{}\cdot{}},
group-minimum-digits=4,
text-angstrom={Å},math-angstrom={\text{Å}},
text-micro=\ensuremath{\othermu},
math-micro=\othermu,
}
\begin{document}
$\num[math-rm=\mathbf]{.1}$ \textbf{0,1} \textbf{\SI{.1}{\km}}
\end{document}
答案1
以下 MWE 顯示它\mathbf
本身也不會產生粗體逗號。您也可以使用\bm
同名套件:
\documentclass{article}
\usepackage{siunitx}
\usepackage{bm}
\sisetup{
unit-mode = text,
locale=FR,
detect-all,
inter-unit-product = \ensuremath{{}\cdot{}},
group-minimum-digits=4,
text-angstrom={Å},math-angstrom={\text{Å}},
text-micro=\ensuremath{\othermu},
math-micro=\othermu,
}
\begin{document}
$\num[math-rm=\mathbf, mode=math]{.1}$ \textbf{0,1} \textbf{\SI{.1}{\km}}
$\mathbf{,},$
$\num[math-rm=\bm]{.1}$
\end{document}
答案2
在數學週期中,指令的設定方式不會對 mathbf 做出反應。您可以更改此設置(請注意,這會更改間距以及字元使用的字體。根據您實際的字體設置,它可能會產生副作用):
\documentclass{article}
\usepackage{siunitx}
\sisetup{
unit-mode = text,
locale=FR,
detect-all,
inter-unit-product = \ensuremath{{}\cdot{}},
group-minimum-digits=4,
text-angstrom={Å},math-angstrom={\text{Å}},
text-micro=\ensuremath{\othermu},
math-micro=\othermu,
}
\DeclareMathSymbol{.}{\mathalpha}{operators}{"2E}
\DeclareMathSymbol{,}{\mathalpha}{operators}{"2C}
\begin{document}
$1.234\quad 1,234\quad \mathbf{1.234\quad 1,234} \quad\num[math-rm=\mathbf]{.1}$
\end{document}
另一種方法是使用文字字體:\num[math-rm=\textbf]
。