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



\mymathbb{1} x + y


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 Answer 1


(Not quite an answer.)

The offending lines are in sansmath.sty:


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!

You must log in to answer this question.

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