Playing some necromancy here, the answer looks very different in 2021. I especially advise against using bbm
, as the accepted answer suggests, since the old-fashioned font format it loads will come out pixelated in a PDF, and nobody prints DVIs out on paper any more.
I’d recommend using unicode-math
in LuaTeX when you can, and legacy fonts when you have to. Nearly all OpenType math fonts support \mathbb{1}
and \Bbbone
out of the box. Few if any come with a bold version that supports \boldsymbol{\mathbb{1}}
, but you can fake it if you need it:
\documentclass{article}
\tracinglostchars=2
\usepackage{unicode-math}
\setmathfont{NewCMMath-Book}
\setmathfont{NewCMMath-Book}[
version=bold,
FakeBold = 1.2 ]
\begin{document}
\[ \mathbb{1} \boldsymbol{\mathbb{1}}
\]
\end{document}
If your publisher still requires you to use PDFTeX, or you should wish to, the mathalpha
package provides a consistent interface for loading and scaling math alphabets, including blackboard bold and bold blackboard bold. Here are the options that ship with TeX Live and at least partially work:
(Note that you do not need to define \Bbbbone
this way in your own document! I put this in the template to simplify testing.)
\documentclass{article}
\usepackage{amsmath}
\usepackage[bb=dsserif]{mathalpha}
\usepackage{bm}
\pagestyle{empty}
\newcommand\Bbbbone{%
\ifdefined\mathbbb%
\mathbbb{1}%
\else%
\boldsymbol{\mathbb{1}}%
\fi}
\begin{document}
\[ \mathbb{1} \Bbbbone
\]
\end{document}
The dsserif
alphabet is the only free one I know of that supports both blackboard-bold and bold-blackboard-bold digits in Type-1 format, and that a package can load without changing your other fonts. You will probably want to scale this to match your math font, with the bbscaled=
package option.
With bb=pazo
instead of bb=dsserif
:
With bb=fourier
:
With bb=esstix
:
With bb=boondox
:
There are other legacy packages not available through mathalpha
(as of February 2021). Here are some of the more important ones that have not already been mentioned.
The cmathbb
package is an attractive outline font based on Computer Modern bold.
With \usepackage[varbb]{newtxmath}
, you get the same alphabet as in Xovee’s answer, but replacing the standard \mathbb
:
There is a similar option for newpxmath
(although this is incompatible with bm
).
\documentclass{article}
\usepackage{amsmath}
\usepackage[varbb]{newpxmath}
\pagestyle{empty}
\newcommand\Bbbbone{%
\ifdefined\mathbbb%
\mathbbb{1}%
\else%
\boldsymbol{\mathbb{1}}%
\fi}
\begin{document}
\[ \mathbb{1} \Bbbbone
\]
\end{document}
There is yet another blackboard bold alphabet available through newtxmath
and newpxmath
, with the vvarbb
package option:
The stix
and stix2
packages load an alphabet similar to boondox
. (Which is a fork of the STIX fonts.) Here is what you get with \usepackage{stix2}
instead of mathalpha
:
\mathbb
provided as part of theamsfonts
package does not provide numerals. Section 3.3 ofamsfonts
' documentation states that the\mathbb
command it provides uses themsbm
font and so supports only uppercase letters: no lowercase, no numerals.\mathbb
provided byamsfonts
. if you wish to replace only the digit "1", you can use the method described here: Importing a single symbol from a different font$A$
is\chi_A
.