Typeset mathematical symbols also in sans serif font?

I've been looking into this myself as well, but it seems a lot trickier to get it working for math fonts than for regular text font. Apparently the math fonts have some 'metric' used for kerning that is not present in regular fonts. Some (partial) solutions I found:

  • Use fontspec to change the math font

Like this:

\setmathrm{Arial}
\setmathsf{Arial}
\setmathtt{Arial}
\setboldmathrm[BoldFont={Optima ExtraBlack}]{Optima Bold}

However this does not change the italic math font for some reason (and there does not seem to be an option to do this(?)).

  • Use sfmath, which comes with a couple of pre-packaged fonts

\usepackage[cm]{sfmath}

  • Use custom math font packages

\usepackage{cmbright}

This works fairly well, but the choice of fonts is limited.

  • Use unicode-math in combination with STIX fonts (see here and here)

For example:

\usepackage{unicode-math}
%\usepackage[math-style=ISO]{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
%\setmathfont[range=\mathit/{latin,Latin}]{Adobe Garamond Pro}

Although this has the problem that \setmathfont{} gives a bug when used in combination with amsmath...


For whole document:

\usepackage{arev}

or

\usepackage{cmbright}

See A Survey of Free Math Fonts for TeX and LaTeX

For only some letters and numbers in part of a document, use \mathsf.


The easiest way I've found to do this is to use \mathsf. So I write

$ 7\times \rho = \mathsf{c_1} $