[Tex/LaTex] How to apply both \mathbf and \left to a \langle

bolddelimitersformatting

I want text surrounded by a bold-face \left\langle ... \right\rangle.
But when I use \mathbf or \pmb, I get errors, and when I use \bm, it doesn't seem to do anything.
Is there a command that does this? I don't want to use \big, because I want this in a macro that I can use in many different places.

Best Answer

bm works for me:

enter image description here

\documentclass{article}

\usepackage{bm}

\DeclareBoldMathCommand\boldlangle{\left\langle}
\DeclareBoldMathCommand\boldrangle{\right\rangle}


\begin{document}

$ \left<a\right> $

$ \bm{\left<a\right>} $

$ \boldlangle a\boldrangle$

\boldmath

$ \left<a\right> $

\end{document}

Update after clarification from comments...

OK take a step back.

\mathbf switches the font used for math letters usually to the same font uses for \textbf ie upright bold. So by design it does not affect the font used for symbols.

boldsymbol essentially makes a box, switches to \boldmath and then goes back in to math (with some technicalities to get the right size and spacing) so by design makes as much go bold as possible. However in the classic cm font distribution there is no bold extension font so LaTeX does not have a line

\SetSymbolFont{largesymbols}{bold}{OMX}{cmex} {bx}{n}

because there is no such font, so the bold math setup uses the normal weight extension font as you saw.

It may well be that a newer math font collection has more bold fonts (I don't have it now but I'm sure MathTime did for example) but the set of fonts available to you depends on whether you have commercial fonts and whether you are using classic Tex or xetex or luatex that can more easily use system fonts.

\pmb is poor man's bold so it has almost no dependencies but is typographically rather dubious if over used, it literally just sets its argument three times with small horizontal and vertical offset. So as seen below it will make its entire argument bold with almost no restrictions on what that argument is.

If you want to make just the delimiters bold using \pmb you need to make an invisible rule of the right size (that's what \vphantom does) and then you can separately \pmb a delimiter pairing before and after the main expression.

\bm First tries to add a bold symbol from the math bold setup to the normal weight setup, and if it can not do that either because the bold math setup is using the same font, or you have already used 16 fonts in the current math setup, it uses a version of \boldsymbol (if the bold font is different) or a version of \pmb otherwise. However immediately after \left or \right its choices are a lot more limited as TeX is in a rather delicate state at that point.

So best would be to look around the available math fonts to find one with a bold extension font, otherwise one of the \pmb variants below will probably do what you want:

\documentclass{article}
 \usepackage{amsmath,bm} 
\DeclareBoldMathCommand\boldlangle{\left\langle} 
\DeclareBoldMathCommand\boldrangle{\right\rangle} 

\def\sigh#1{%
\pmb{\left\langle\vphantom{#1}\right.}%
#1%
\pmb{\left.\vphantom{#1}\right\rangle}}
\begin{document}

 \[ \left\langle \boldlangle a\boldrangle\right\rangle \] 

\[\left\langle \boldlangle \sum_{i=1}^n \boldrangle \right\rangle\] 

{\boldmath
\[\left\langle \boldlangle \sum_{i=1}^n \boldrangle \right\rangle\] 
}

\[\pmb{\left\langle \sum_{i=1}^n\right\rangle}\]

\[ \left\langle\sigh{\sum_{i=1}^n}\right\rangle\]
\end{document}

enter image description here

Related Question