# [Tex/LaTex] How to get \mathbb{1} to work (characteristic function of a set)

formattingmath-mode

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?

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}