# \DeclareMathSymbol with Pazo Math Blackboard Bold (from Mathpazo)

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".

-

\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

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


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

-