2

I have a document using MinionPro as serif and MyriadPro as sans-serif font families. Math is set by default with the serif font but for captions I like to switch to the sans-serif font. A minimal working example would be:

\documentclass[11pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{MinionPro}
\usepackage{MyriadPro}
\usepackage[onlysansmath]{mdsymbol}
\usepackage{sansmath}

\begin{document}

{\sffamily
This should be sans-serif, but the math isn't: $E=\hbar\omega$}

This should be sans: $E=\hbar\omega$
\end{document}

However, I can get math with MyriadPro if I use the option \usepackage[math]{MyriadPro} and using the mdsymbol package. Then however, I have no serif math any more... How can I get it to work properly? I tried also to use sansmath but that didn't work. I also looked at this question but I cannot get it to work with my choice of fonts.

0

1 Answer 1

3

Are you aware of sansmath option of MyriadPro?

\documentclass[11pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{MinionPro}
\usepackage[sansmath]{MyriadPro}
% \usepackage[onlysansmath]{mdsymbol}
% \usepackage{sansmath}

\begin{document}

{\sffamily\mathversion{sans}% <=====
This should be sans-serif, but the math isn't: $E=\hbar\omega$}

This should be sans: $E=\hbar\omega$
\end{document}

You must log in to answer this question.

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