5
$\begingroup$

How can I typeset blackboard bold numbers? What I need is simply something like $\mathbb A$ (\mathbb{A}) but with A replaced numbers. With Miktex I can import the bbm package and use \mathbbm 1. But this seems impossible with Mathjax.


Reply to Calvin Khor:

On my computer \mathbb doesn't work for numbers. Below is a screenshot of your exact answer:


Image starts here

enter image description here

Image ends here


You see that on the first line where you wrote "rendered code" I see plain numbers. Not sure why. It could be because of the platform. I am using Win10 with Chrome.

$\endgroup$
4
  • 1
    $\begingroup$ I'm a little confused, does \mathbb{1234567890}$\mathbb{1234567890}$ give nothing? It works for me, I'll upload a screenshot imgur.com/yYaKLl8 $\endgroup$ Jun 2, 2020 at 7:19
  • 1
    $\begingroup$ @CalvinKhor It's weird. I see only plain numbers on my computer. But the ones given by unicode does work. See my edited question. $\endgroup$
    – trisct
    Jun 2, 2020 at 7:47
  • 1
    $\begingroup$ All my Math.SE life thus far I've been using \mathbb 1 unaware of this issue... I believe the "MathJax tutorial" doesn't mention anything, math.meta.stackexchange.com/questions/5020/… , there seems to be a similar issue for lowercase letters math.meta.stackexchange.com/questions/28930/… , a tiny bit of discussion about unicode characters here math.meta.stackexchange.com/questions/6865/… $\endgroup$ Jun 2, 2020 at 8:30
  • $\begingroup$ Blackboard bold is for blackboards. What's wrong with real boldface, \bf? Does this work: $\bf1234567890$ $\endgroup$ Jun 28, 2020 at 23:18

3 Answers 3

5
$\begingroup$

I do not understand why, but \mathbb{1234567890}(rendered code: $\mathbb{1234567890}$) works for me, and gives the following output

enter image description here

If it matters, I'm on a Mac with the latest build of Catalina, viewing the site through Safari. edit it seems that the "math renderer" that you are using is important: my web browser is using "HTML-CSS" as the math renderer. (I checked via right-clicking on some rendered MathJax) When I switch to MathML, \mathbb{1234567890} also just gives me plain numbers.

Can you see the characters πŸ™πŸšπŸ›πŸœπŸπŸžπŸŸπŸ πŸ‘πŸ˜? I think you can copy-paste them into MathJax code e.g. $$ πŸ™+𝟚+πŸ›=𝟜^𝟟_{𝟠^𝟑!}$$ gives $$ πŸ™+𝟚+πŸ›=𝟜^𝟟_{𝟠^𝟑!}$$ I would guess this is not "documented behavior", but Unicode characters in general seem to work in Mathjax e.g. $\int_{🐢>1}\frac{1}{1+🐢^{100🐢}} d🐢>🐱$$\int_{🐢>1}\frac{1}{1+🐢^{100🐢}} d🐢>🐱$. What is documented is the \unicode{} command which I learned from the comments to my answer here; it seems that (peeking at Wikipedia to find the correct Hex number to use)

$\unicode{x1D7D8}\unicode{x1D7D9}\unicode{x1D7DA}\unicode{x1D7DB}\unicode{x1D7DC}\unicode{x1D7DD}\unicode{x1D7DE}\unicode{x1D7DF}\unicode{x1D7E0}\unicode{x1D7E1}$

should give you something that works too: $\unicode{x1D7D8}\unicode{x1D7D9}\unicode{x1D7DA}\unicode{x1D7DB}\unicode{x1D7DC}\unicode{x1D7DD}\unicode{x1D7DE}\unicode{x1D7DF}\unicode{x1D7E0}\unicode{x1D7E1}$

PS for my first 20 or so $\LaTeX$ documents I used the following poor substitute that should "work" for everyone (output: $1\!\!12\!\!2 3\!\!3 4\!\!4 5\!\!5 6\!\!6 7\!\!7 8\!\!8 9\!\!9 0\!\!0$)

$1\!\!12\!\!2 3\!\!3 4\!\!4 5\!\!5 6\!\!6 7\!\!7 8\!\!8 9\!\!9 0\!\!0$

In particular for '1' I had a further variant $1\hspace{-0.21em}\text l$ $1\hspace{-0.21em}\text l$.

$\endgroup$
7
  • $\begingroup$ Safari supports MathML natively -- is that the math renderer you're using? I believe only Firefox and Safari (still!) currently support MathML and maybe that's the difference? $\endgroup$
    – postmortes
    Jun 2, 2020 at 7:50
  • $\begingroup$ @postmortes, Safari tells me that the math renderer is "HTML-CSS". Don't know what it means, but when I switch to MathML, I also get plain numbers for \mathbb{1234567890}! $\endgroup$ Jun 2, 2020 at 7:53
  • $\begingroup$ Thanks :) That's odd then as none of the browsers (Edge, Chrome, Brave) I have on this Windows 10 system will render the bold numbers properly no what matter renderer I choose $\endgroup$
    – postmortes
    Jun 2, 2020 at 8:02
  • $\begingroup$ I think it is documented that Unicode works; in any case it came up at times already. What not few might not realize is how far one can go with this. $\endgroup$
    – quid Mod
    Jun 2, 2020 at 11:49
  • $\begingroup$ @quid Yeah, I only meant that I couldn't explicitly find it in an admittedly cursory glance/search through the actual documentation of MathJax. I think this "character fallback" might be what's happening docs.mathjax.org/en/latest/output/… $\endgroup$ Jun 2, 2020 at 12:06
  • 1
    $\begingroup$ @CalvinKhor interesting. It seems from this that it is less of an explicit feature than I thought. $\endgroup$
    – quid Mod
    Jun 2, 2020 at 12:14
  • $\begingroup$ @postmortes I summarised my findings on that github issue page in your answer, and I got an explanation why it works for me: the HTML-CSS renderer uses my local installation of the "STIX fonts" which come preinstalled on my machine, and these fonts come with blackboard bold lowercase and numbers. I suspect you can replicate this if you install the STIX fonts and use the same renderer. In addition it is planned to work for everyone in MathJax 3 (if/when Math.SE begins to use it) $\endgroup$ Jun 5, 2020 at 4:39
5
$\begingroup$

From this thread, which was the most recent I could find, it looks like it's on the wish-list for MathJax (and has been for a while), but isn't implemented yet.

https://github.com/mathjax/MathJax/issues/792

$\endgroup$
0
$\begingroup$

I have the same problem of rendering using an OS W8.1. Another simple alternative it to use the command \pmb+{unicode black board number} as for example:

$$\pmb{πŸ™,𝟚,πŸ›,𝟜,𝟝,𝟞,𝟟,𝟠,𝟑,𝟘}$$

$\endgroup$

You must log in to answer this question.

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