1

I need mathbb symbols for 0 and 1. Currently I'm doing this using the bbold fonts. This works great:

\documentclass[10pt]{article}
\DeclareMathAlphabet{\mymathbb}{U}{bbold}{m}{n}
\usepackage{amsmath}

\begin{document}

\begin{displaymath} \mymathbb{0} \mymathbb{1} x + y \end{displaymath}

\end{document}

bbold 01x+y

However, in another part of my document, I'm using sansmath. As soon as I include the sansmath package, the bbold fonts break, even if I don't use sansmath.

01x+y not in bbold

How can I get sansmath to stop breaking the other math fonts?

What's odd is it only seems to break for numbers. mymathbb{N} works just fine.

1 Answers1

1

(Not quite an answer.)

The offending lines are in sansmath.sty:

\DeclareMathSymbol{0}{\mathord}{operators}{`0}
\DeclareMathSymbol{1}{\mathord}{operators}{`1}
...

which globally declare 0 and 1 to use the operators symbol font.

I don't have a good workaround beyond creating a local copy of sansmath.sty in which these lines are commented out. But maybe this will be good enough for you!