3

What I'm trying to do is write a number as \num{number} in boldface inside an align environment. After looking for an answer, I found bm and siunitx mismatch, but it didn't solve the problem. Here's an MWE:

\documentclass[10pt, fleqn]{article}

\usepackage{amsmath, amsfonts, amssymb, bm}

\usepackage{siunitx}
  \sisetup{detect-weight = true,detect-inline-weight = math} % from https://tex.stackexchange.com/questions/416289/bm-and-siunitx-mismatch

\begin{document}

$\bm{bob{\num{5}\SI{30}{\km}}}$ % example looked

  \begin{align*}
      \bm{P_{i,\text{\textbf{ef.}}}} &= 139.40 \times 87.47 \bm{\approx 12193.88} \text{ \textbf{kN}} \\
      \bm{P_{0}} &= \num{12193.88} \times (1 - 0.15) \bm{\approx {\num{10364.79}}} \text{ \textbf{kN}}
  \end{align*}

\end{document}

which generates the following

enter image description here

In the second equation the implementation of \bm{\num{10364.79}} doesn't make the number bold. Is there a way to solve this?

  • 2
    It should be \SI{12193.88}{\kilo\newton} rather than \num{12193.88}\text{ kN} – egreg Oct 31 '19 at 7:36
2

You need to add detect-display-math = true to the \sisetup command:

\sisetup{
    detect-weight = true,
    detect-inline-weight = math,
    detect-display-math = true,
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.