CTAN Comprehensive TeX Archive Network

Directory fonts/cm/mathbb-one

README.md

mathbb-one

\mathbb{1} for amssymb.

amssymb's blackboard bold has no digits, so \mathbb{1} prints a stray symbol instead of the indicator đťź™. mathbb-one adds the missing 1 and changes nothing else:

\usepackage{amssymb}
\usepackage{mathbb-one}

$\mathbb{E}[\mathbb{1}_A] = \mathbb{P}(A)$

The glyph is the 1 from Gilles F. Robert's bbm fonts, the usual choice for an indicator because it matches the Computer Modern style of \mathbb. bbm only exists as source, so pdf embeds it as a 600 dpi bitmap. mathbb-one ships it as a Type 1 outline font instead.bbm bitmap (left) and mathbb-one (right), enlarged

Compared with the alternatives

Every answer to .SE question 26637, each set the way the answer suggests. Packages that replace \mathbb also change the letters next to the 1.blackboard-bold 1 options

Details

  • Works with pdf, Lua and . Load it before or after amssymb.
  • \mathbb{1} works in subscripts and next to letters (\mathbb{R1}). Other \mathbb letters and ordinary digits are not affected.
  • \Bbbone is also defined, under the same name unicode-math uses. If unicode-math is loaded, mathbb-one does nothing and the math font's own đťź™ is used.
  • Sizes follow amssymb: one design each for 5pt, 7pt and 10pt and up. So the 1 has the same weight relative to the letters as \mathbb does, in text and in subscripts.
  • mathbb-one doesn't need bbm or bbm-macros.

OpenType version

If you use Lua or with unicode-math, your math font already has a đťź™. If you'd rather have bbm's, opentype/mathbb-one.otf provides just that glyph. Don't load mathbb-one.sty; take the 1 from the OpenType font instead:

\usepackage{unicode-math}
\setmathfont{NewCMMath-Regular.otf}
\setmathfont[range="1D7D9]{mathbb-one.otf}   % đťź™ (U+1D7D9) comes from mathbb-one

This changes \Bbbone. unicode-math sets \mathbb{1} through its blackboard-digit alphabet instead, so if you write \mathbb{1}, use range={"1D7D9,bb/num}. The catch is that \mathbb{0}, \mathbb{2}, ... then come out empty, because the font only has the 1.

finds fonts by file name only if you write the .otf extension, as above.

Install

From Live or MiK (once mathbb-one is on CTAN): nothing to do, just \usepackage{mathbb-one}. If it's missing, run tlmgr install mathbb-one or use the MiK console.

In a single project (also Overleaf, or a journal submission): put these files flat in the same folder as your main .tex file, not in a subfolder:

paper.tex
mathbb-one.sty
mathbb-one.map
mathbb-one5.tfm  mathbb-one7.tfm  mathbb-one10.tfm
mathbb-one5.pfb  mathbb-one7.pfb  mathbb-one10.pfb

They're in this repo's tex/, map/, tfm/ and type1/ folders, and in the same folders of mathbb-one.zip from the releases. finds them by name in the document's folder, but it doesn't search subfolders.

To keep them in a subfolder instead, say mathbb-one/, add a file named latexmkrc next to your .tex file:

# Let TeX find mathbb-one's files in the mathbb-one/ subfolder.
foreach my $var ('TEXINPUTS', 'TFMFONTS', 'T1FONTS', 'TEXFONTMAPS') {
    ensure_path($var, './mathbb-one//');
}

This works when you build with latexmk (also via the Workshop extension in VS Code, and on Overleaf, which reads a latexmkrc in the project root).

For all your documents: run make install. It copies the files into your personal tree (TEXMFHOME, usually ~/Library/texmf on macOS or ~/texmf on Linux), where they have to sit in the standard layout. To do it by hand, copy this repo's folders as follows:

This repo Into TEXMFHOME
tex/ tex/latex/mathbb-one/
tfm/ fonts/tfm/public/mathbb-one/
type1/ fonts/type1/public/mathbb-one/
map/ fonts/map/dvips/mathbb-one/
opentype/ fonts/opentype/public/mathbb-one/

You don't need to run updmap or mktexlsr. make uninstall removes the files again.

Building the fonts

brew install potrace fontforge
make fonts

source/build.sh renders the 1 of bbm5, bbm7 and bbm10 at high resolution with , traces it with potrace, and assembles a one-glyph .pfb with FontForge. pk2pbm.py needs only the Python standard library. build_t1.py runs inside FontForge's own Python. Run it from a path without spaces, because can't read them.

make doc rebuilds the user guide doc/mathbb-one.pdf and the comparison sheet doc/mathbb-one-compare.pdf. make ctan builds mathbb-one.zip, the CTAN upload. make release VERSION=x.y builds that zip, tags vx.y and publishes a GitHub release with the zip and the user guide attached. Bump \ProvidesPackage in tex/mathbb-one.sty first.

Licence

See LICENSE. In short, the bbm sources say: "You may freely use, modify and/or distribute this file." The fonts here are derived from them and are distributed on the same terms. mathbb-one.sty and the build scripts are under the LPPL 1.3c.

Download the contents of this package in one zip archive (845.5k).

Mathbb-one – Blackboard-bold 1 for amssymb’s \mathbb, as a vector font

amssymb’s \mathbb has no digits, so \mathbb{1} (the indicator function) prints a stray symbol. Loading mathbb-one makes \mathbb{1} and \Bbbone print the 1 from Gilles F. Robert’s bbm fonts, the closest match to the Computer Modern style of \mathbb, shipped as Type 1 outlines instead of bitmaps. Nothing else changes. Works with pdf, Lua and ; under unicode-math it steps aside. An OpenType bbone.otf is included for unicode-math users who prefer this glyph.

PackageMathbb-one
Repository
Version1.0 2026-11-04
LicensesThe Project Public License 1.3c
Free license not otherwise listed
Copyright2026 Thomas Beck
MaintainerThomas Beck
TopicsOTF font
BBD font
Font
Maths font
Font Type1
Font supp maths
...
Guest Book Sitemap Contact Contact Author