102

I'm typing a bold vector small x with a tilde sign above it. Now when I want to write its derivative, I'm putting a dot on top of everything. This is giving me problems and I found one solution:

\overset{\mathrm{\textbf .}}{\boldsymbol{\mathrm{\tilde{x}}}}

after I read this post: How to make a larger "\dot" . This post has a solution for a similar problem: \overset{\bm .}{a}

To write bold mathematical symbols, such as vectors is \boldsymbol better or do you recommend using the bm package? I have always been using \boldsymbol.

2 Answers 2

47

If you take a look at the documentation for bm, it says that if the bold fonts are not allocated, it will use the correct symbol—if it exists—by using \boldmath, but that this is slower. If there is not a bold version of the symbol, it uses poor man's bold.

I think that in most cases, you want to use \bm.

3
  • Thanks. If bm is slower, then I guess sticking to \boldsymbol may be a better choice. Using \boldsymbol I guess will be better than a poor man's bold? Is this correct? Sep 19, 2010 at 9:46
  • @yCalleecharan: No, you misunderstood. As I understand the documentation, \bm will use the appropriate symbol if the symbol exists in the font and it's loaded. If the symbol exists in a font that isn't loaded, then it will still be used via \boldmath which is slower than the previous case. If there is no symbol, then it uses poor man's bold.
    – TH.
    Sep 19, 2010 at 10:05
  • Ok thanks. I only use the computer modern fonts in TeXLive. I will take a better look at the bm documentation. Sep 19, 2010 at 12:33
221

The \bm command from package bm has both advantages and drawbacks over the \boldsymbol command from package amsbsy (loaded by amsmath). The first advantage of \bm is that it keeps the italic correction, so that something like \bm{T}_1^2 will look better than \boldsymbol{T}_1^2 (if you want to compare the two in a document, you must be careful that bm redefines \boldsymbol):

bm vs. boldsymbol: italic correction

The second advantage is that \bm does not disrupt the spacing, whereas \boldsymbol does, even though it works correctly for binary operations (like +) and for relations (like =). As an example, here's the comparison between \boldsymbol{[}-1;1] and \bm{[}-1;1]:

bm vs. boldsymbol: spacing

However, \bm sometimes requires the user to add braces to avoid problems. For example, \bm{\dots} will provoke an error with amsmath, the solution being to type \bm{{\dots}}. Double accents also need to be enclosed in braces to work properly:

\documentclass{article}
\usepackage{amsmath,bm}
\begin{document}
%$\bm{\dots}$% causes an error
$\bm{\mathinner{\dots}}$% works
$\bm{\hat{\dot{\phi}}}$% does not work correctly
$\bm{{\hat{\dot{\phi}}}}$% works correctly
\end{document}

bm double accents: with and without braces

Finally, math alphabet nesting works better with \boldsymbol than with \bm. For example, here's the result of \mathrm{g\boldsymbol{g}} and \mathrm{g\bm{g}}:

bm vs. boldsymbol: font nesting

13
  • @Philippe: instead of \boldsymbol{T}_1^2 one can use \boldmath${T}_1^2$\unboldmath instead of \bm
    – user2478
    Feb 8, 2011 at 22:47
  • 3
    @Herbert: if you want to put all the formula in bold, using \boldmath is fine, but if you want only one of the symbols of the formula to be in bold, you must use \bm or \boldsymbol (or \mathbf) on it and not touch anything else. It's in that case that the lack of italic correction is problematic with \boldsymbol. Feb 9, 2011 at 12:56
  • 20
    This excellent comparison is underrated and should be the accepted answer. I've bumped it by some minor grammar fixes. Feb 21, 2011 at 14:04
  • 1
    @HenriqueFerrolho: since the aim is to put the argument in bold and most symbols are already italic, defaulting to italic seems the most logical choice. If need be, you can always use \mathbf for upright bold math letters. There's no correct behaviour, it depends on what you want to achieve. Typographically speaking, putting widely used symbols in bold has never been a great practice as it can harm the color of the page if there are too many of them on a given page. May 31, 2019 at 10:30
  • 1
    For anyone who cannot use bm and wants to solve the \boldmath{[} problem you aptly pointed out, a workaround is: \mathopen{\boldsymbol{[}}-1;1]
    – Davislor
    Sep 10, 2021 at 22:22

You must log in to answer this question.

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