1

In this mwe, the first décimal separator is not bold, how to fix this?

enter image description here

\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}

2 Answers 2

1

The following MWE demonstrates that \mathbf itself does also not yield a bold comma. You could alternatively use \bm from the eponymous package:

\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}

enter image description here

1
  • 1
    And for SI, $\SI[math-rm=\bm,unit-math-rm=\mathbf, number-unit-product={\mbox{\bfseries\,}}]{.1}{\km}$
    – Tarass
    Commented Feb 21, 2018 at 13:46
2

In math period and command are setup in a way that they don't react to mathbf. You could change this (be aware that this changes spacing and so font used by the chars. Depending on your real font setup it can have side effects):

\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}

enter image description here

An alternative is to use a textfont: \num[math-rm=\textbf].

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .