Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried the bbm package? (so using \mathbbm{1}) –  Thomas Jun 10 '11 at 12:56

3 Answers 3

up vote 4 down vote accepted

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}
share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.