# Mathsymbol in the documentclass memoir

I write a thesis with \documentclass{memoir} and included the ams packages by

usepackage{amsmath,amssymb,amsfonts,mathrsfs,datetime}


However there is the difference in using bolt math sign. Here is the way I would like to have it

\documentclass{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb,amsfonts,mathrsfs}
\begin{document}
Here are some words

$$\mathbb{S}$$
\end{document}


and here is some code how it is displayed in the memoir class

  \documentclass[11pt,a4paper,titlepage]{memoir}
\usepackage[OT1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[sc]{mathpazo}
\usepackage{amsmath,amssymb,amsfonts,mathrsfs}
\begin{document}
Here are some words
$$\mathbb{S}$$
\end{document}


and here is the output

How can I get the same mathbb symbol in the second code as in the first one?

-
mathpazo is changing the black board font. Remove it if you want AMS black board fonts. – Sigur Jan 6 '14 at 11:57
do not use the OT1 encoding, use T1 – Herbert Jan 6 '14 at 11:57
As others have mentioned, mathpazo and amssymb both provide bb fonts, so the load order matters. BTW: this question has nothing to do with memoir – daleif Jan 6 '14 at 12:03
@daleif I will retag my question. Is there a way that math-code is displayed using the amssymb? – m. th Jan 6 '14 at 12:09
Exactly what do you mean by math-code? – daleif Jan 6 '14 at 12:26

You have to revert the setting made by mathpazo with respect to \mathbb:

\documentclass[11pt,a4paper]{memoir}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage[sc]{mathpazo}

\AtBeginDocument{\DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n}}

\begin{document}
Here are some words $\mathbb{S}$
\end{document}


-
Wow thanks egreg! That's was exactly what I was looking for! – m. th Jan 6 '14 at 12:19
Hum... very interesting. We can use any other font for \mathbb! I tested cmss. But suppose that I want to use cmtt for the normal math font. How to do this? I tried your code together \mathrm but no success. – Sigur Jan 6 '14 at 13:05
@Sigur That's much more complicated. Look at fntguide.pdf – egreg Jan 6 '14 at 13:13
@egreg, very very nice guide. Thanks a lot! – Sigur Jan 6 '14 at 13:15