# Blackboard Bold i

Although it is not standard notation, I quite like the fact that in Mathematica, a blackboard bold i is used to represent the imaginary unit. Apart from making it stick out, it allows me to write things such as

,

allowing me to use the variable 'i' as an iterator in series, etc. To achieve this in LaTeX, I've made use of the bbm package (\mathbbm i), however this doesn't render as nicely as the standard AMS math \mathbb command, in fact, it looks pixellated up close:

Is there a way to achieve a nicer blackboard bold i symbol? I'm not very fond of what is offered by the packages bbold, mathbbol or dsfont packages either, I want to get something as close to AMS's \mathbb as possible.

• Maybe better privide a MWE? – Dr. Manuel Kuehner Nov 8 '17 at 19:49
• I don't think it's anything to do with my compiler, it's just simply the way the bbm package is defined. In fact if you zoom into any of the symbols in the package documentation, you'll notice they pixelate too: tug.ctan.org/macros/latex/contrib/bbm/bbm.pdf – Luke Collins Nov 8 '17 at 19:52
• Well, if you use a bitmap font you have to expect some pixels. You won't get them with a scalable font. – TeXnician Nov 8 '17 at 19:53
• Is there a non-bitmap font alternative? – Luke Collins Nov 8 '17 at 19:56
• Are you free to use LuaLaTeX instead of pdfLaTeX? – Mico Nov 8 '17 at 20:05

Here, I use dafrick's answer at Double-struck zero and one to use the boondox-ds versions of bb fonts, designated here as \mymathbb{}. I used j in one location so that you can see it is not pixelated.

The fonts are installed via the boondox-dx package, which is not invoked below, so as not to overwrite the native \mathbb implementation otherwise available through amssymb.

\documentclass{article}
\usepackage{amsmath}
\DeclareMathAlphabet{\mymathbb}{U}{BOONDOX-ds}{m}{n}
\begin{document}
$x_i(t) = \mathop{\mathrm{Re}}(A_i e^{8000\pi\mymathbb{j}t}c^{\phi_i\mymathbb{i}}) \text{for i = 1, 2, 3}$
\end{document}


In comments, the OP asks for the \mathbb{i} from TG Pagella Math (OpenType format), but for use in pdflatex, which is not available. Since it is only a single glyph that is being requested, here is a kludge to obtain it:

Create the document TGbbi.tex as follows, and compile in Xelatex:

\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
$\mathbb{i}$
\end{document}


It creates the output TGbbi.pdf containing only the Pagella version of \mathbb{i}. Now, reverting back to pdflatex, we are going to call upon that graphic for use in a macro named \bbi defined as

\newcommand\bbi{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle\mathbb{i}$}\includegraphics[height=\ht0]{TGbbi}}}


This macro requires the graphicx package (to import the graphic) and the scalerel package (to auto-scale it to the proper math size, taken as the vertical height of the regular \mathbb{i}). Thus, the implementation (showing use in several different math sizes) is

\documentclass{article}
\usepackage{amssymb,amsmath,scalerel,graphicx}
\newcommand\bbi{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle\mathbb{i}$}\includegraphics[height=\ht0]{TGbbi}}}
\begin{document}
$x_i(t) = \mathop{\bbi\mathrm{Re}}(A_i e^{8000\pi\bbi t}c^{\phi_i\bbi}) \text{for i = 1, 2, 3}$
\end{document}


Zoom:

• Thanks for your answer. I'm interested in using the Tex Gyre Pagella font family as shown in @Mico's answer, however I can't find the relevant family name. I always have trouble finding these out. Any ideas? – Luke Collins Nov 9 '17 at 8:31
• @LukeCollins At tug.dk/FontCatalogue/texgyrepagella, it says "The TeX Gyre Pagella family of fonts is based on the URW Palladio family, but heavily extended. Math support is available in OpenType format." (emphasis added). I understand this to mean that to get math support like \mathbb using that font, one must use xelatex or lualatex and not pdflatex. But I will try to examine this further and post another comment if I find otherwise. – Steven B. Segletes Nov 9 '17 at 10:42
• @LukeCollins See my FOLLOW UP for a way to fake it. – Steven B. Segletes Nov 9 '17 at 11:38

If you're free to use LuaLaTeX and the unicode-math package and its \setmathfont macro, there are quite a few math fonts to choose from that provide a "double-struck" lowercase-i character.

Hopefully, one of the following eight choices will appeal to you. :-)

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{Stix Two Text} % choose the text font...

% Setting up eight [8!] math fonts
\setmathfont{Latin Modern Math}[version=lm]
\setmathfont{Cambria Math}[version=cambria]
\setmathfont{Asana Math}[version=asana]
\setmathfont{Stix Two Math}[version=stix2]
\setmathfont{XITS Math}[version=xits]
\setmathfont{TeX Gyre Termes Math}[version=termes]
\setmathfont{TeX Gyre Pagella Math}[version=pagella]
\setmathfont{TeX Gyre DejaVu Math}[version=dejavu]

\newcommand\blurb{$\mathbb{123}\quad\mathbb{hij}\quad e^{\phi_i\mathbb{i}}$}
\begin{document}
\begin{tabular}{ll}
Latin Modern & \mathversion{lm}      \blurb\\
Cambria      & \mathversion{cambria} \blurb\\
Asana        & \mathversion{asana}   \blurb\\[1ex]
Stix Two     & \mathversion{stix2}   \blurb\\
XITS         & \mathversion{xits}    \blurb\\[1ex]
Termes       & \mathversion{termes}  \blurb\\
Pagella      & \mathversion{pagella} \blurb\\
DejaVu       & \mathversion{dejavu}  \blurb
\end{tabular}
\end{document}

• +1 as usual. Why do you need luatex here? Isn't lmodern a standard package for pdftex? – Dr. Manuel Kuehner Nov 8 '17 at 20:55
• @Dr.ManuelKuehner - Thanks. The OpenType version of Latin Modern Math has many more glyphs than does the "standard" version, i.e., the one that's loaded via \usepackage{lmodern}. The seven other math fonts used in the answer also feature lots and lots of glyphs. – Mico Nov 8 '17 at 21:22
• HI Mico, thanks for your answer. Can this be achieved in pdfLaTeX using a similar strategy to @Steven B. Segletes' answer? I particularly like how the double stroke i looks in TeX Gyre Pagella. – Luke Collins Nov 9 '17 at 8:30
• @LukeCollins - There's a reason I started my answer with "If you're free to use LuaLaTeX...". To quote from the TeXGyre website: "TeX-Gyre-Math is a col­lec­tion of maths fonts to match the text fonts of the TeX-Gyre col­lec­tion. The col­lec­tion is available in OpenType for­mat, only;". Thus, I don't think it's possible to replicate the look of the "Pagella" line in the answer using methods available in pdfLaTeX. Aside: Is something stopping you from using LuaLaTeX instead of pdfLaTeX? – Mico Nov 9 '17 at 11:26
• @Mico No not really, I'm just used to pressing F5 in TeXStudio :) Thanks for your answer. – Luke Collins Nov 9 '17 at 16:50

The package cmathbb offers Blackboard Bold characters compatible with the Computer Modern.

It is the only package that I found to provide good results for \mathbb{i} for pdflatex.

• +1 Nice new package, though I'd describe it more as outline font than a blackboard bold. – campa Jan 22 at 11:23
• Welcome to TeX.SE! – Mensch Jan 22 at 12:06