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:
I stumbled upon this post in stack exchange:
fontspec required more effort than the one minute I really wanted to spend on it. sfmath didn't work for me??? and cmbright worked first go with just \usepackage{cmbright}. Font blends well with my current (supposedly Arial) san serif font.Some (partial) solutions I found:
- Use
fontspec
to change the math fontLike 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}
\usepackage{cmbright}
This works fairly well, but the choice of fonts is limited.
- Use
unicode-math
in combination with STIX fonts (see here, 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 withamsmath
...
No comments:
Post a Comment