TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems that macros form the \siunitx package have a \bm problem, but no problem with \textcolor:

enter image description here

Note that the 180 passed thru the \ang macro is not bold.

So, how do I change the \MyFormat macro so that \bm passes thru the siunitx macros.





    \MyFormat{\frac{180}{\pi}} = \MyFormat{\frac{\ang{180}}{\pi}}

share|improve this question
Colour and font weight are treated differently as siunitx deliberately resets the font, but does nothing to the colour. – Joseph Wright Jul 24 '12 at 17:56
I ran that document with \tracingall but decided to go home rather than look at it, thankfully someone else answered. You should try it:-) \ang is more complicated than it looks (and so is \bm for that matter:-) – David Carlisle Jul 24 '12 at 19:48
@DavidCarlisle: Wow!! With just the siunitx package and the document consisting only of \ang{180} I get a 5.4MB file with \tracingall. ...Well, if have just the package included and an completely empty document I still get a 4.7MB file!! How can you possibly debug with \tracingall? – Peter Grill Jul 24 '12 at 20:48
The log file looks a bit scary at first but nothing looks too bad once you have it safely in an emacs buffer. – David Carlisle Jul 24 '12 at 20:58
@PeterGrill There's a lot of font switching going on. You are best off with the trace package and \traceon. (Of course, I have the advantage of knowing where to look in the first place, at least in theory.) – Joseph Wright Jul 25 '12 at 18:25
up vote 12 down vote accepted

You can configure the siunitx package to detect bold math. Try

\sisetup{detect-weight, detect-display-math}

For in-line formulae, you additionally need:

share|improve this answer
To elaborate a little, siunitx can deal with math mode material either as 'matching' the surrounds or as 'independent'. With the standard settings, it ignores font changes entirely. If you turn on weight detection, math material is as standard treated as 'matching' the text it is within. – Joseph Wright Jul 24 '12 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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