12

I've found that \mathbb{1} works when using mathpazo:

\documentclass{article}
\usepackage{mathpazo}
\begin{document}
    $\mathbb{1}$
\end{document}

enter image description here

But \mathbb{0} doesn't work (doesn't display anything at all), and my searches haven't led me to any solutions so far. Is it possible to get a blackboard-bold 0? Or other numbers?

3
  • Have you tied \mathbb{0}? You will need to tell us which packages you are using, and give a MWE. Feb 12, 2012 at 14:31
  • I was using mathpazo. And no, \mathbb{0} doesn't work.
    – jtbandes
    Feb 12, 2012 at 14:38
  • Please consider about cmathbb.sty
    – MadyYuvi
    Jan 29, 2023 at 9:28

3 Answers 3

12

the bbold font has the blackboard bold "0", although it is not shown in the "comprehensive symbols index" (texdoc comprehensive from your command line if you have tex live installed), table 213, "math alphabets". the other blackboard bold fonts shown there do not have the zero, although some of them have other digits.

0
14

you can try to run xelatex or lualatex with:

\documentclass{article}
\usepackage{fontspec,unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{XITS Math}
\begin{document}
    $\mathbb{0}\mathbb{1}$
\end{document}

enter image description here

or with Asana Math instead of the STIX fonts:

enter image description here

3

Cmathbb.sty also a solution for this, and the MWE is:

\documentclass{article}
\usepackage{cmathbb}
\begin{document}
$\mathbb{123456789}$

$\mathbb{abcdefghijklmnopqrstuvwxyz}$

$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\end{document}

enter image description here

Or, if you don't want to use any font package, then you can try with contour.sty and the MWE is:

\documentclass{article}
\usepackage{xcolor}
\usepackage[auto]{contour}
\begin{document}

\contour{black}{\color{white}123456789}

\contour{black}{\color{white}abcdefghijklmnopqrstuvwxyz}

\contour{black}{\color{white}ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\end{document}

enter image description here

7
  • Your answer seems to be a bit short. You could add a MWE and show the result.
    – dexteritas
    Jan 29, 2023 at 11:10
  • I'm not in system,so only I suggest the package name only, I will post the code once I'll be in system
    – MadyYuvi
    Jan 29, 2023 at 11:41
  • 1
    Also if any error in my suggestion or if my suggestion doesn't meet op requirement then you can downvote else should not do
    – MadyYuvi
    Jan 29, 2023 at 11:45
  • I found your answer in the review queue of low quality posts, and it already had -1 when I wrote my comment. I voted "Looks OK" with the expectation that you may add to the answer later.
    – dexteritas
    Jan 29, 2023 at 15:09
  • 1
    It should be noted that as of now, the cmathbb fonts wont work on case-sensitive systems such as Linux due to a bug. Jan 30, 2023 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .