LaTeX forum ⇒ Fonts & Character SetsBlackboard bold numbers; trouble with \mathbb

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
299792458
Posts: 2
Joined: Thu Jan 19, 2012 11:55 pm

Blackboard bold numbers; trouble with \mathbb

Postby 299792458 » Fri Jan 20, 2012 12:09 am

Hello everyone,

I just started using LaTeX and I have an issue with the \mathbb command. Letters work just fine, but when I am trying to use double-struck numbers, e.g. with \mathbb{1}, this character

character.jpg
character.jpg (631 Bytes) Viewed 16714 times


shows up instead of the blackboard bold number 1. I did find out I can circumvent this by creating combining the characters "1" and "I" to make somewhat of a double-struck "1", but I would still like to know what is going wrong when I use \mathbb.

Any help would be appreciated.
Last edited by Stefan Kottwitz on Fri Jan 20, 2012 12:58 am, edited 1 time in total.
Reason: image uploaded to forum

User avatar
Stefan Kottwitz
Site Admin
Posts: 9366
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Jan 20, 2012 1:03 am

Welcome to the board!

\mathbb (of amsfonts) supports only letters, not digits. You could use bbm:

  1. \documentclass{article}
  2. \usepackage{bbm}
  3. \begin{document}
  4. \[
  5. \mathbbm{1}
  6. \]
  7. \end{document}


identity-bbm.png
identity-bbm.png (433 Bytes) Viewed 16714 times


Or dsfont:

  1. \documentclass{article}
  2. \usepackage{dsfont}
  3. \begin{document}
  4. \[
  5. \mathds{1}
  6. \]
  7. \end{document}


identity-ds.png
identity-ds.png (876 Bytes) Viewed 16714 times


Stefan
Site admin

299792458
Posts: 2
Joined: Thu Jan 19, 2012 11:55 pm

Postby 299792458 » Fri Jan 20, 2012 2:21 am

Thanks for the quick response.

I have a follow-up beginner's question right away: Is there an easier way of installing dsfont in MiKTeX than figuring out by myself where to put the individual files, as the documentation suggests? As it appears to me the dsfont package cannot be installed via the package manager in MiKTeX.

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Fri Jan 20, 2012 7:30 pm

299792458 wrote:[…] I have a follow-up beginner's question right away: Is there an easier way of installing dsfont in MiKTeX than figuring out by myself where to put the individual files, as the documentation suggests? As it appears to me the dsfont package cannot be installed via the package manager in MiKTeX.

Search the package list in the MiKTeX Package Manager (MPM) for the doublestroke package and install it.


Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest