0

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.

  • 2
    The \rm command has been deprecated for almost 25 years. – egreg Oct 22 '17 at 20:29
  • That's what I thought - Oh well, still go back to the Leslie Lamport book now and then. Maybe I'll just use \textrm immediately after \begin{document} and then nothing in equations. This issue came up since I was using colors and was setting roman after color choice as well. –  Oct 22 '17 at 20:30
  • The second edition was released in 1994 – egreg Oct 22 '17 at 20:32
  • I did use the LaTeX Companion (Goossens, Mittelbach, Samarin) for years -- which I think was geared toward LaTeX2e? –  Oct 22 '17 at 20:36
  • i'm confused about why you should need to apply such a command, unless what you are writing is in a non-latin script. you didn't say anything about that possibility. ??? – barbara beeton Oct 22 '17 at 20:41
  • @wrtsvkrfm “The LaTeX Companion” (first edition) mentions \rm for saying, basically, it should not be used. – egreg Oct 22 '17 at 20:42
  • I don't think Lamport mentions \rm at 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
  • Thanks for the comments. What I really need would be best practice for using a preamble command once, which will change entire document from roman, serif, and Helvetica. I realize that math environments will always be in math-roman. Also assuming users won't have e.g. the MTPRO2 or Lucida package like I do - so that's not an issue. –  Oct 22 '17 at 20:57
  • I'm too tired to post an answer now, but take a look at this answer for math environments. – Ian Thompson Oct 22 '17 at 21:41
  • your question is not at all clear, \mathrm will give you the same font on math as \rm does (\rm being 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

0 Answers0