# Package bbold for mathematical symbol

Reading the documentation of bbold package (see ftp://ftp.dante.de/tex-archive/fonts/bbold/bbold.pdf), it shows that some mathematical symbols can be written with the \mathbb format. Such as +, (, etc.

However, I don't know how to get this result as \mathbb{+} doesn't give the desired result.

Any ideas?

• Welcome to TeX.SX. Normally when asking a question you would post minimal working example...but perhaps it is a little hard for this question:) – Andrew Oct 7 '17 at 8:44

The other answers have provided you the reasons why \mathbb{+} does not work off-hand. If you would like to use these symbols in a math context, you can declare it as a math symbol, with proper spacings (e.g. + in math mode should have spacing around it matching that of \mathbin because it is a binary operator etc.). See this answer for more details.

In this case, the + is a Math symbol defined in fontmath.ltx as such:

\DeclareMathSymbol{+}{\mathbin}{operators}{"2B}


Motivated by this, you can define the blackboard + math symbol in a similar way, by declaring a symbol font and then a math symbol like so:

\documentclass[12pt]{article}
\usepackage{bbold}

\DeclareSymbolFont{bbsymbol}{U}{bbold}{m}{n}
\DeclareMathSymbol{\bbplus}{\mathbin}{bbsymbol}{"2B}

\begin{document}
\noindent
Normal: $a+b$ \\ % No blackboard, correct spacing
\verb|\bbplus|: $a\bbplus b$ \\ % Blackboard, correct spacing
\verb|\mathbb|: $a\mathbb{+}b$ % No blackboard, wrong spacing
\end{document}


which gives:

You should be able to extrapolate from this for other symbols by yourself.

Resident font gurus would hopefully correct this or post a new answer if there is an easier way to do this.

The bbold package issues:

\DeclareMathAlphabet{\mathbb}{U}{bbold}{m}{n}


But this only makes \mathbb have any effect on so-called variable family type math things, like letters. Things like +, (, ) are not by default of variable family type, hence they don't react to it.

\documentclass{article}
\usepackage{bbold}
\usepackage{mathastext}
\MTnonlettersobeymathxx
\begin{document}

Mathbb: $\mathbb{+)()}$

Textbb: \textbb{+)()}

\end{document}


However this will have other effects. Check the mathastext doc how to turn this on also in subdued mode if at all possible.

You can load mathastext in subdued mode. Then you need to move the activation of non-letters to after begin document.

\documentclass{article}
\usepackage{bbold}
\usepackage[subdued, defaultmathsizes, defaultimath, nohbar]{mathastext}
\begin{document}
\MTnonlettersobeymathxx

Mathbb: $\mathbb{+)()}$

Textbb: \textbb{+)()}

\end{document}


The impact of mathastext is then kept to a minimal level (but adding basic option would turn off the effect of \MTnonlettersobeymathxx on symbols).

For full details, please refer to Extended scope of the math alphabets commands section in mathastext documentation. In particular, the operators get correct spacing, when everything is inside \mathbb argument :

Examples to show spacing: (only second case gets it wrong)
$a+b$
$a\mathbb{+}b$
$a\mathbb{{}+{}}b$
$\mathbb{a+b}$


According to the documentation for the bbold package:

To use the fonts in LATEX2ε, you select the bbold package, and then use the \mathbb command to get blackboard bold mathematics, \textbb for text, or \bbfamily for longer text.

The code below, which produces

shows that \textbb is more successful with the characters +, (, ):

\documentclass{article}
\usepackage{bbold}
\begin{document}

Mathbb: $\mathbb{+)()}$

Textbb: \textbb{+)()}

\end{document}