1

All I have in my preamble is

\renewcommand{\familydefault}{\sfdefault}

which gives me the font I like. However, I would like to change the math font only. I have no particular of in mind, would like to try out different ones.

Is it possible to keep my current font and only change the math font? If so, how do I do this?

I've tried googling and most results tell me to use a package, but that package also changes my font.

  • 4
    Use whatever package you find and then ask how to get the text font back. That is much easier. But you will have to give a minimal example as without it nobody will know what text font you are using currently. – Ulrike Fischer May 23 '18 at 18:15
2

Math setup is quite complicated and normally involves a number of fonts and symbol definitions.

A number of packages that setup maths and text fonts allow to setup only the math by loading a subpackage. E.g. instead of arev you can load arevmath. Check the documentation to find out if your package has such a subpackage.

If not you can always reset the text fonts later on. E.g.

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage{arev} %changes all text fonts too

\renewcommand\rmdefault{cmr}  %set back rm
\renewcommand\sfdefault{cmss} %set back sf
\renewcommand\sfdefault{cmtt} %set back tt

\begin{document}

The serif font, \textsf{sans serif} \texttt{typewriter font}

$a=b=\int_1^2 f(x)$

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.