# Best way to typeset the identity operator, or unit? [duplicate]

Possible Duplicate:
Blackboard bold characters

I have seen the unit (or identity operator) typeset via

\newcommand{\unit}{1\!\!1}


Is this really the best way to get a double-stroke 1? The obvious guess, \mathbb{1}, does not work.

Or is the use of a double-stroke 1 (rather than "Id" or just a simple "1") for this purpose frowned upon?

## marked as duplicate by Joseph Wright♦Sep 3 '11 at 20:44

• I would highly recommend \usepackage{bbm} and \newcommand\idop{\bbm 1}. – Niel de Beaudrap Sep 3 '11 at 20:53
• This can be confusing. – Wok Dec 4 '12 at 12:38

Try \mathds from the dsfont package:

\documentclass{article}

\usepackage{dsfont}

\begin{document}

\noindent
$$\mathds{1}$$

\end{document}


The resulting output is: