How to select a blackboard bold font for Concrete math

boldmathfonts

I am using in my document the concmath package, but there is no blackboard bold font linked to the command \mathbb{} with this font package. I already asked this question elsewhere and I got this solution :

\makeatletter
\def\afterfi#1#2\fi{\fi#1}
\def\map#1#2{\mapA{}#1#2\@nnil}
\def\mapA#1#2#3{\ifx\@nnil#3\empty \afterfi{#1}\else \afterfi {\mapA{#1#2{#3}}#2}\fi}

\protected\def\mathbb#1{\leavevmode\textup{\map\mathbbA{#1}}}
\def\mathbbA#1{\setbox\z@\hbox{#1}\copy\z@\kern-\wd\z@ \kern.13em\box\z@}
\makeatother

$u=\{u(t)\}_{t\in\mathbb R^2} \quad \mathbb{NZQIRCOSABC}$

which slightly shifts the letter to produce the blackboard font, but this looks horrible for some letters.

Is there a way to generate a decent looking blackboard bold font for concrete ?

Thank you in advance for any advice.

Best Answer

An alternative is to use the ccfonts package, which is still being updated. The concmath package is from last century.

\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{ccfonts}

loads either the AMS or Concrete version of all the standard math alphabets.

Otherwise, you can pick a blackboard font you like from mathalpha and load that after ccfonts or concmath.

Be aware, either of these will give you pixelated METAFONT math fonts, unless you pay money for the Micropress Concrete Math font in Type 1 format. You don’t need to do that, though: either you’re publishing in a journal that licenses the font, or you’re free to use a modern TeX engine that supports OpenType.

In LuaLaTeX or XeLaTeX, you might try pairing Concrete with the math symbols from the slab serif font GFS Neohellenic:

\documentclass{article}
\usepackage[math-style=upright]{unicode-math}
\usepackage[paperwidth=10cm]{geometry} % Format a MWE for TeX.SX

\setmainfont{CMU Concrete}[
  Ligatures=Common,
  UprightFont=cmunorm.otf,
  BoldFont=cmunobx.otf,
  ItalicFont=cmunoti.otf,
  BoldItalicFont=cmunobi.otf ]

\setmathfont{GFS Neohellenic Math}[Scale=MatchLowercase]
\setmathfont{cmunoti.otf}[range=it]
\setmathfont{cmunorm.otf}[range=up]

\begin{document}
\noindent%
Let \( (x,y) \in \mathbb{R} \times \mathbb{R} \)
such that \( \sqrt{x^2 + y^2} \leq \varepsilon \).
\end{document}

CMU Concrete + GFS Neohellenic Math sample

Or load unicode-math without math-style=upright to get italic math symbols more like the legacy packages. Changing the option to math-style=ISO will slant your upright Greek letters, too.

\documentclass{article}
\usepackage[math-style=ISO]{unicode-math}
\usepackage[paperwidth=10cm]{geometry} % Format a MWE for TeX.SX

\setmainfont{CMU Concrete}[
  Ligatures=Common,
  UprightFont=cmunorm.otf,
  BoldFont=cmunobx.otf,
  ItalicFont=cmunoti.otf,
  BoldItalicFont=cmunobi.otf ]

\setmathfont{GFS Neohellenic Math}[Scale=MatchLowercase]
\setmathfont{cmunoti.otf}[range=it]
\setmathfont{cmunorm.otf}[range=up]

\begin{document}
\noindent%
Let \( (x,y) \in \mathbb{R} \times \mathbb{R} \)
such that \( \sqrt{x^2 + y^2} \leq \varepsilon \).
\end{document}

CMU Concrete + GFS Neohellenic Math sample

In either case, you can swap in a different blackboard bold alphabet with a command like

\setmathfont{STIX Two Math}[range=bb,
                            Scale=MatchUppercase]
Related Question