In a previous question here I basically asked how to change the default mathmode font to lmodern. I had a good answer but partial however, I was recommended to create another post to solve the issue. My problem is that the function created to change the font does only apply on text that is written in exponent or index like below in the image but not on the text written on a normal line. How do we solve this ? I don't want the default mathmode font at all when i type text in any math environments.
Asked
Active
Viewed 69 times
1 Answers
4
\documentclass{article}
\usepackage{lmodern}
\everymath{\fam=0\relax}
\begin{document}
zzz $something_{anything}^{anything}$
\end{document}
This effectively adds \mathrm{...} around every math formula.
David Carlisle
- 757,742


\rmis not defined by default in latex, you can use\everydisplayas well as\everymathand set\famin both. @BachirHassaine – David Carlisle Feb 25 '22 at 21:19