[Tex/LaTex] Typesetting the Identity Operator for txfonts

charactersfontssymbols

I use the txfonts package in my document for fonts. However, I am at a loss as to how to produce the identity operator, which looks like a blackboard bold 1. Now,

\documentclass{article}

\usepackage{bbold}

\begin{document} 
\[
\mathbb{1}
\]
\end{document}

produces basically what I am looking for. However, this also replaces all of the other \mathbb characters with those from the bbold package. Is there a better way to obtain the identity operator symbol?

Best Answer

Both txfonts and bbold declare the math alphabet \mathbb, therefore the first definition is overwritten by the package which is loaded last. If you generally want to use the txfonts blackboard bold symbols, you can declare a new math alphabet \mathbbold instead of loading bbold:

\documentclass{article}

\DeclareMathAlphabet{\mathbbold}{U}{bbold}{m}{n}    
\usepackage{txfonts}

\begin{document}
\[
\mathbbold{1}, % from bbold
\mathbb{N} % from txfonts
\]
\end{document}