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.

enter image description here

1 Answer 1


enter image description here




zzz $something_{anything}^{anything}$


This effectively adds \mathrm{...} around every math formula.

  • Nice thanks, if i want to type a formula with \equation environment it goes back to standard mathmode font. I finally understand that i just have to type \rm in the environnment to get out of this. Thank you Feb 25, 2022 at 21:16
  • \rm is not defined by default in latex, you can use \everydisplay as well as \everymath and set \fam in both. @BachirHassaine Feb 25, 2022 at 21:19
  • thank you it's awesome Feb 26, 2022 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .