3

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?

1
  • Have you tried the bbm package? (so using \mathbbm{1})
    – Thomas
    Commented Jun 10, 2011 at 12:56

3 Answers 3

4

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}
3

The problem really is when you use both \usepackage{bbold} and \usepackage{amsfont} (or \usepackage{mathsymb}) together: depending which one is last, you get different \mathbb fonts.

A workaround is to use the http://ctan.mines-albi.fr/help/Catalogue/entries/mathbbol.html package: a working example is

\documentclass{article}
\usepackage{mathbbol}
\usepackage{amsfonts}
\begin{document}
  \[                                                                              
  \Eins \ne \mathbb{1}                                                            
  \]
\end{document}

P.S. \mathbbm also works, but you use a slightly different font, which might be OK or not OK depending on your taste.

2

I suggest using the bbm package. So you can produce a blackboard 1 by:

\documentclass{article}
\usepackage{bbm}

\begin{document} 
$\mathbbm{1}$
\end{document}

Here are some other answers that go a bit deeper :

How do I make a blackboard 1?,

Blackboard bold characters

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .