## Friday, August 31, 2012

### san serif math fonts

So I switched formatting in my thesis to a san serif font because I prefer it and my figures all had san serif fonts in them already and I wanted them to match so... but I have some equations and lots of in-text symbols, superscripts and subscripts using math mode and when I switched to san serif they stayed serif, unless I used \text{} in math mode.
I stumbled upon this post in stack exchange:
Some (partial) solutions I found:
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(?)).
\usepackage[cm]{sfmath}
\usepackage{cmbright}
This works fairly well, but the choice of fonts is limited.
For example:
\usepackage{unicode-math}
%\usepackage[math-style=ISO]{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}

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