7

I've seen various topics here adressing how to turn math symbols bold, but none of them gives a suitable option for \mathbb characters, as in \mathbb{ABC}.
I have tested some options to see which commands turn which symbols in bold. Here is my code:

\documentclass{article}
\usepackage{amsmath} % some math-related packages, not sure which of them are necessary
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bm} % for \bm
\usepackage{fixmath} % for \mathbold
\begin{document}
\section{Some text $\mathbb{ABC}abc\cosh\div+\alpha$ some text} %1
\section{Some text $\boldsymbol{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %2
\section{Some text $\mathbf{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %3
\section{Some text $\pmb{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %4
\section{Some text $\boldmath{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %5
\section{Some text $\bm{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %6
\section{Some text $\mathbold{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %7
\end{document}

enter image description here

(The absence of \div in numbers 2 and 6 are not typos, neither is the 'ff' in number 3.) Apparently \pmb is the only command which turns \mathbb{ABC} bold. But it makes the characters quite ugly, take a close look: (on the right is the normal version) enter image description here

If no alternative shows up, I think I'll just use \pmb for the \mathbb characters and \boldsymbol or something for the others.

Is there any alternative to turn \mathbb{ABC} bold?

5
  • 2
    "blackboard bold" is the name given to this alphabet because the double strokes are a simulation of bold with chalk on a blackboard, although they have been adopted with specific meanings that no longer have much to do with the "bold" association. what is the reason/meaning for making them even "more bold"? Sep 3, 2014 at 15:21
  • 2
    Note that \boldmath in math mode is wrong. However, in a math oriented document, formulas should not be made bold according to the context, as the weight of characters carries semantics: a boldface variable is not the same as the normal weight one.
    – egreg
    Sep 3, 2014 at 15:38
  • 1
    Traditional typography denoted number sets simply with upright boldface letters. Just see Bourbaki's treatise…
    – Bernard
    Sep 3, 2014 at 15:54
  • @barbarabeeton I didn't know they are meant to be bold. Anyway they don't look as bold as other boldface characters. egreg: thanks for the tip, your are right about that. But in my case it is only meant to make all the text/maths in a title look the same, so I think it is not wrong to do it. Bernard: It's the first time I hear that. (Somehow I always thought the notation was used since Euler's time, probably it's not.) I've grown up with \mathbb{N}, see. Sep 3, 2014 at 16:58
  • I saw this in a list of FAQs to refer new users to, and thought it needed an updated answer.
    – Davislor
    Oct 3, 2019 at 23:23

2 Answers 2

5

Here I place three copies in close horizontal proximity by defining \fakebold{}. One can obviously modify it to use more copies, or to apply vertical offset as well. The horizontal offset is given by \bshft, currently set to 0.18pt.

By using the \ThisStyle{...\SavedStyle...} feature of scalerel, it should work across math styles, so that $\fakebold{A_b} A_{\fakebold{b}} A_b$ will give the expected result.

\documentclass{article}
\usepackage{amsmath} % some math-related packages, not sure which of them are necessary
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bm} % for \bm
\usepackage{fixmath} % for \mathbold
\usepackage{scalerel}
\newlength\bshft
\bshft=.18pt\relax
\def\fakebold#1{\ThisStyle{\ooalign{$\SavedStyle#1$\cr%
  \kern-\bshft$\SavedStyle#1$\cr%
  \kern\bshft$\SavedStyle#1$}}}
\begin{document}
\section{Some text $\mathbb{ABC}abc\cosh\div+\alpha$ some text} %1
\section{Some text $\boldsymbol{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %2
\section{Some text $\mathbf{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %3
\section{Some text $\pmb{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %4
\section{Some text $\boldmath{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %5
\section{Some text $\bm{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %6
\section{Some text $\mathbold{\mathbb{ABC}abc\cosh\div+\alpha}$ some text} %7
What comes next is new
\section{Some text $\protect\fakebold{\mathbb{ABC}abc\cosh\div+\alpha}$ some text}%8
\LARGE$\fakebold{\mathbb{ABC}a}\mathbb{ABC}a$
\end{document}

enter image description here

and a close-up:

enter image description here

14
  • 1
    but that's essentially \pmb as used in the question, perhaps with slightly different offsets. Sep 3, 2014 at 15:42
  • 2
    OK:-) pmb isn't designed to be flexible (it's really designed not to b eused:-) Sep 3, 2014 at 15:49
  • 1
    @barto Here is a definition that avoids the use of \ooalign and scalerel, if that is the issue: \def\fakebold#1{\setbox0=\hbox{$#1$}#1\kern-\wd0\kern\bshft#1\kern-\wd0\kern\bshft#1} Sep 3, 2014 at 19:46
  • 1
    Yesss! I found the problem by rebuilding my document: it has something to do with the hyperref-package: it compiles when I don't load it but doesn't when I do. I load the package as \usepackage[hidelinks]{hyperref}, but even without hidelinks it doesn't work. I tried to load the package in the very beginning of the preambule and at the very end, without success. Probably it is the same problem as here: something with the table of contents. Sep 4, 2014 at 11:46
  • 2
    Apparently the trick is to use \texorpdfstring{$math$}{some text that doesnt really matter}. (Perhaps it's a good idea to vote up the comments which are relevant for future readers.) Sep 4, 2014 at 12:00
0

There are several packages that do this, but I recommend unicode-math if you can use it, or mathalpha if PDFLaTeX compatibility is a requirement.

The mathalpha package is compatible with PDFLaTeX. It will load the bold version of the double-struck math alphabet you select as \mathbbb, if there is one.

\documentclass{book}
\usepackage[bb=boondox]{mathalpha}

\begin{document}
\( \mathbbb{ABCa}
   \mathbb{ABCa} \)
\end{document}

Boondox font sample

In the modern toolchain, unicode-math will load a bold Unicode math font automatically if the math font you select has one. (As of 2019, XITS Math, Libertinus Math and Minion Math do.) You can select it with \boldsymbol from amsmath, \boldmath or \mathversion{bold}.

\documentclass{book}
\usepackage{amsmath}
\usepackage{unicode-math}

\newcommand\mathbbb[1]{\boldsymbol{\symbb{#1}}}

\setmathfont{XITS Math}

\begin{document}
\( \mathbbb{ABCa}
   \mathbb{ABCa} \)
\end{document}

XITS Math sample

You can also specify a bold math font manually with version=bold, for example:

\setmathfont[version=bold, Scale=MatchUppercase]{Minion Math Semibold}

Finally, unicode-math allows you to declare an arbitrary OpenType or TrueType font as a math alphabet with \DeclareMathAlphabet.

2

You must log in to answer this question.

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