2

I would like to get a bold double struck one and I tried to use

\symbf{\symbb{1}}

but this does not work sadly. Is there some way to still get the desired result?

Thanks for your help :-)

Update: Here is the code I ended up using as proposed similar in the accepted answer.

\makeatletter
\DeclareRobustCommand{\pmbv}{\mathpalette\pmbv@}
\def\pmbv@#1#2{\setbox8\hbox{$\m@th#1{#2}$}%
    \setboxz@h{$\m@th#1\mkern.13mu$}\pmbraise@\wdz@
    \binrel@{#2}%
    \dimen@-\wd8 %
    \binrel@@{%
        \mkern-.4mu\copy8 %
        \kern\dimen@\mkern.25mu\raise\pmbraise@\copy8 %
        \kern\dimen@\mkern.25mu\raise2\pmbraise@\box8 %
    } 
}
\makeatother

which produces a one like this:

Ones

  • Do bold double struck glyphs exist at all in Unicode? – egreg Nov 3 '18 at 16:47
  • I don't know, maybe not. Then I would have to decide if I use the bold or double struck one for my identity matrix. – F. Spitzer Nov 3 '18 at 16:50
2

You can use the poor man's bold from the amsbsy package, which prints the symbol three times slightly shifted (see, e.g., LaTeX Calligraphic Script Bold).

For symbols such as the double struck gamma in the example below this looks more or less fine, but in many other cases you can clearly see the overprint which does not look very nice (that's why it is called poor man's bold...). In the MWE below I have copied the definition of \pmb and removed one of the three copies to improve the result a little.

Code:

\documentclass{memoir}
\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{amsbsy}
\setmathfont{Asana Math}

\makeatletter
\DeclareRobustCommand{\pmbd}{\mathpalette\pmbd@}
\def\pmbd@#1#2{\setbox8\hbox{$\m@th#1{#2}$}%
\setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@
\binrel@{#2}%
\dimen@-\wd8 %
\binrel@@{%
\mkern-.4mu\copy8 %
%\kern\dimen@\mkern.4mu\raise\pmbraise@\copy8 %
\kern\dimen@\mkern.4mu\box8 }%
}
\makeatother

\begin{document}
% regular
$1 2 \symbf{1} \symbf{2} \symbb{1} \symbb{2} \Gamma \symbf{\Gamma} \symbb{\Gamma}$
% poor man's bold double (from redefinition)
$\pmbd{1 2 \symbf{1} \symbf{2} \symbb{1} \symbb{2} \Gamma \symbf{\Gamma} \symbb{\Gamma}}$
% poor man's bold triple (from package)
$\pmb{1 2 \symbf{1} \symbf{2} \symbb{1} \symbb{2} \Gamma \symbf{\Gamma} \symbb{\Gamma}}$

\end{document}

Result:

enter image description here

  • Thank you! This absolutely solved my problem. I will update the code I used in the end in my question. – F. Spitzer Nov 4 '18 at 12:39
6

Don't know if this approach has any appeal. Works with pdf specials (pdflatex). First column is \mathbb{R}. The other columns are variations on the stroke thickness. The top row is with black fill, the 2nd row with white fill.

\documentclass[10pt]{article}
\usepackage{xcolor,amssymb}
\input pdf-trans
\newbox\qbox
\def\usecolor#1{\csname\string\color@#1\endcsname\space}
\newcommand\bordercolor[1]{\colsplit{1}{#1}}
\newcommand\fillcolor[1]{\colsplit{0}{#1}}
\newcommand\colsplit[2]{\colorlet{tmpcolor}{#2}\edef\tmp{\usecolor{tmpcolor}}%
  \def\tmpB{}\expandafter\colsplithelp\tmp\relax%
  \ifnum0=#1\relax\edef\fillcol{\tmpB}\else\edef\bordercol{\tmpC}\fi}
\def\colsplithelp#1#2 #3\relax{%
  \edef\tmpB{\tmpB#1#2 }%
  \ifnum `#1>`9\relax\def\tmpC{#3}\else\colsplithelp#3\relax\fi
}
\newcommand\outline[1]{\leavevmode%
  \def\maltext{#1}%
  \setbox\qbox=\hbox{\maltext}%
  \boxgs{Q q 2 Tr \thickness\space w \fillcol\space \bordercol\space}{}%
  \copy\qbox%
}
\bordercolor{black}
\def\thickness{.3}% TO CHANGE THICKNESS OF SHADOW
\fillcolor{black}
\begin{document}
\fillcolor{black}
$\mathbb{R}$
\def\thickness{.1}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}
\def\thickness{.2}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}
\def\thickness{.3}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}

\fillcolor{white}
$\mathbb{R}$
\def\thickness{.1}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}
\def\thickness{.2}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}
\def\thickness{.3}% TO CHANGE THICKNESS OF SHADOW
\outline{$\mathbb{R}$}
\end{document}

enter image description here

Ref: Composition of \mathbb and \mathcal

2

You can get a bold math symbol by using the bold math style. In unicode-math, for example, you can use XITS Math Bold:

\documentclass[varwidth, preview]{standalone}
\usepackage{unicode-math}

\defaultfontfeatures{Scale=MatchUppercase}

\setmainfont{xits}[
  Scale = 1.0 ,
  Ligatures = {Common, TeX} ,
  UprightFont = *-regular ,
  BoldFont = *-bold ,
  ItalicFont = *-italic ,
  BoldItalicFont = *-bolditalic ,
  Extension = .otf
]
\setmathfont{xits-math.otf}
\setmathfont[version=bold]{xits-mathbold.otf}

\newcommand\mathbbbf[1]{\mbox{\boldmath\(\symbb{#1}\)}}
\newcommand\mathbbbfit[1]{\mbox{\boldmath\(\symbbit{#1}\)}}

\begin{document}
\( \mathbb{D} \mathbbbf{D} \mathbbit{D} \mathbbbfit{D} \)
\end{document}

Font Sample

Simpler and more convenient: \boldmath\mathbb from amsmath.

You can also declare these new math alphabets with \setmathfontface.

In legacy NFSS, there are several packages that provide a bold double-struck alphabet. I would recommend the mathalpha package (formerly mathalfa), which automatically loads bold-double-struck as \mathbbb if you select a blackboard alphabet that has a corresponding bold version:

\documentclass[varwidth, preview]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{textcomp} % Not used here.
\usepackage[bb = boondox]{mathalpha}

\begin{document}
\( \mathbb{D} \mathbbb{D} \)
\end{document}

Boondox font sample

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.