Getting sans-serif mathematics
There are situations where a sans-serif font is required for documents. It can be, for example, a requirement by a university or institute. It may even be a design decision – for example, presentation slides often use a sans-serif font. It’s the default behavior of the LaTeX beamer class.
You can switch to sans-serif for the default text font family using this command:
\renewcommand{\familydefault}{\sfdefault}
In such a case, it’s desirable to print math formulas in sans-serif as well to get a consistent design. The beamer class already does this.
In this recipe, we will do that for an arbitrary class. We will change all math formulas to have a sans-serif font.
How to do it...
We will use the sfmath package. Follow these steps to get sans-serif math formulas:
- Load the sfmath package. Do it after font packages or commands that change \sfdefault:
\usepackage{sfmath}
- If you use the default font – that...