I am currently using an \rm command as a user-specified base typeface in software that writes output to .tex files. However, I noticed that if \rm gets placed in an equation, you don't get math notation for alphabet characters (italicized) but vertical roman that's not in math fonts.
Is there a general command which will allows e.g. \mathrm to be turned on equations and \textrm to be turned on in text when the user wants roman. In other words, what single command enforces roman in text and roman math notation for alphabet characters inside math environments.
\rmcommand has been deprecated for almost 25 years. – egreg Oct 22 '17 at 20:29\rmfor saying, basically, it should not be used. – egreg Oct 22 '17 at 20:42\rmat all (at least not in the second edition). Anyway, do you want roman letters in math mode for the whole document, or do you want to be able to switch this behaviour on and off? – Ian Thompson Oct 22 '17 at 20:51\rmbeing deprecated or not it is defined to do exactly what you ask it uses \mathrm in math and \rmfamily in text. It would be clearer if you made a small test document and showed how the output should be different to\rm– David Carlisle Oct 22 '17 at 21:47