Saturday, September 22, 2012

redefining underscore in math mode to use rm font

So I use a lot of subscripts, and it annoyed me that they were in italics! I didn't want to call \textrm{} every time in math mode, and there had to be a better way!
I found this stackexchange post which described exactly what I wanted to do and this was their solution:
Unfortunately that redefines _ for ALL uses of it, including in file names etc. I had a lot of file names and folder that used that character, so that wasn't an option. Some more searching and I found:

Which worked a charm! Now all my subscripts are automatically in roman font!

No comments:

Post a Comment