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 want to create a mnemonic command for \mathbb{1} as provided by mathpazo. I can't just use \newcommand*{\unity}{\mathbb{1}}, because that would break the moment I were to change math fonts (e.g., if I wanted to revert to Computer Modern), since usually there is not \mathbb{1} provided and I would need to load a package like bbm.

So instead I thought I could use \DeclareMathSymbol{\unity}{\mathord}{<sym-font-name}{<slot>}. But how can I find the proper family in \DeclareSymbolFont{sym-font-name}{encoding}{family}{series}{shape}?

pazotest.pdf on page 12 states that apparently the slot for \mathbb{1} is "31, but I don't know how to access "Pazo Math Blackboard Bold".

share|improve this question

2 Answers 2

up vote 5 down vote accepted
\documentclass{article}
\DeclareMathAlphabet{\mathbb}{U}{fplmbb}{m}{n}
\begin{document}
  $\mathbb{1ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\end{document}

You can declare a new math alphabet \mathbb and you have access to it without loading mathpazo. The downside is clearly this occupy a math alphabet (out of the limited 16). Another solution which is perhaps more close to what you want is,

\documentclass{article}
\DeclareSymbolFont{PazoBB}{U}{fplmbb}{m}{n}
\DeclareMathSymbol{\unity}{\mathord}{PazoBB}{"31}
\begin{document}
  $\unity$
\end{document}

The point is that you need to find out the encoding, font family name, etc of the Pazo Math font. And these can be found through looking into mathpazo.sty if you want more details

share|improve this answer
    
Thanks, the second solution is what I wanted. Next time, I will directly look at that .sty file. :) –  mSSM May 17 '12 at 20:28

If you don't want to waste a math-alphabet, you can do the following:

\documentclass[11pt]{article}
\usepackage{bbm}

\newcommand*{\unity}{\textrm{{\usefont{U}{fplmbb}{m}{n}1}}}

\begin{document} 
\[
\unity , \mathbbm{R}
\]

\end{document}

enter image description here

If you use amsmath, it would be better to use \text instead of \textrm.

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.