# unicode-math but ordinary blackboard bold

Working with XeLaTex, I use the package unicode-math in my document. Everything is fine except for the mathbb characters, which I would like to have the ordinary way. With unicode-math, \mathbb{R} produces:

while I'd like to have:

(but still use unicode-math for everything else). Now I want to add a command like:

\setmathfont[range=\mathbb]{??Computer Modern??}


where ??Computer Modern?? has to be replaced by the appropriate font name, in order to get back the mathbb symbols which are used before unicode-math is loaded. The problem is, I don't know the appropriate font name of the standard math font (should be Computer Modern or Latin Modern Math or something like that). I have already tried loads of different strings, including "cm", "lmr", "Computer Modern" etc. Any suggestions for the font name which is required by \setmathfont here?

\documentclass{article}
\usepackage{amssymb}
\let\mathbbalt\mathbb
\usepackage{unicode-math}
%\let\mathbb\mathbbalt% UNIVERSAL RESET TO ORIGINAL \mathbb
\begin{document}
$$\mathbb{R}\quad\mathbbalt{R}% OR JUST CALL ON INDIVIDUAL ORIGINAL GLYPHS$$
\end{document}


As written above, one can access the original \mathbb glyphs via \mathbbalt.

Uncommenting the "UNIVERSAL RESET" line gives this result:

• Strange... If I do precisely that then I get nothing. Neither version of the letter R appears, there is just a white background, no errors or warnings either. (If I uncomment the UNIVERSAL RESET line then I get the ugly R, but the one I want does not show up.) The log, however, contains the following line: "Missing character: There is no R in font msbm10!" Mar 27, 2017 at 11:34
• @user50982 Does it compile and render properly if you comment out the \usepackage{unicode-math} line? Mar 27, 2017 at 11:41
• Yes, then I get the nice R I want! Mar 27, 2017 at 11:44
• @user50982 is your unicode-math package up to date? My log file indicates Package: unicode-math 2015/09/24 v0.8c Unicode maths in XeLaTeX and LuaLaTeX. Likewise, Package: amssymb 2013/01/14 v3.01 AMS font symbols Mar 27, 2017 at 11:47
• my unicode-math is 2013/05/04 v0.7e, So I'll have to get a newer version, I guess. Mar 27, 2017 at 11:53

You can undefine \mathbb and then redefine it to do the same it does with amsfonts:

\documentclass{article}
\usepackage{unicode-math}

\AtBeginDocument{%
\let\mathbb\relax
\DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n}%
}

\begin{document}

$\mathbb{R}$

\end{document}


You can still get the standard unicode-math bb letters by \symbb.

• Like in Steven B. Segletes answer this just gives me an empty white page, no errors or warnings. The log contains the line "Missing character: There is no R in font msbm10!" Mar 27, 2017 at 11:43
• @user50982: Probably your system is too old. I see the R with a current miktex, but it disappears in texlive 2014. Mar 27, 2017 at 11:49
• I will have to get a newer version of unicode-math. Mar 27, 2017 at 11:54

In addition to the previous answers (which did not work for me, since my unicode-math is outdated), I found the following workaround (I cannot install a newer version of unicode-math so easily, since I don't have administrator rights). What I did was insert the line

\setmathfont[range=\mathbb]{texgyrepagella-math.otf}


This gave me (despite a warning that the font is not found and "defaults are substituted"), the nice \mathbb{R} I wanted (no idea what the substitute font is called, but it's obviously the right one).

Thanks again also for the other answers which are, of course, the way to go on an up-to-date installation.

• This should be the correct solution as other answers invalidate mathbb behavior in unicode-math. I had to add \setmathfont{latinmodern-math.otf} to fix the default font error. Feb 18, 2020 at 17:51