# How do you get \mathbb{1} to work (characteristic function of a set)?

I am trying to get the digit one printed the \mathbb{} font in math mode, however the command

\mathbb{1}


outputs some rubbish. I certainly saw the character I am after in some pdf's generated from latex, hence my question: how do you get it to work?

-
possible duplicate of How do I make a blackboard 1? – Gonzalo Medina Aug 27 '11 at 15:04
The \mathbb provided as part of the amsfonts package does not provide numerals. Section 3.3 of amsfonts' documentation states that the \mathbb command it provides uses the msbm font and so supports only uppercase letters: no lowercase, no numerals. – mas Aug 27 '11 at 15:52

Since \mathbb doesn't support digits (with amssymb or txfonts) you may use bbm

\documentclass{article}
\usepackage{bbm}
\begin{document}
$\mathbbm{1}$
\end{document}


or dsfont, the doublestroke package:

\documentclass{article}
\usepackage{dsfont}
\begin{document}
$\mathds{1}$
\end{document}


-
I guess \mathbbm{1}is the best in terms of consistency with \mathbb. – Alfredo Hernández Nov 28 '14 at 23:15

Another option is to use bbold package.

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


Though it ruins the letters.

-