Fonts and styles\rm

\rmCommand

Legacy math-mode declaration for switching subsequent symbols in the current group to upright/roman.

x \rm y
Available in
base, textmacros
Kind
declarative
Allowed mode
math, text
Frequency
6.31% of corpus formulasrank 9 of 263
Commonality
medium
Tags
presentation, discouraged
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
textmacrosMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\rm

Takes no arguments. Same argspec in base and textmacros. Reading argspecs

Common tasks#

How to switch a run into roman math#

Legacy switch; prefer \mathrm{d}x.

{\rm d}x

How to write an upright label with \rm#

{\rm Hom}(A,B)

Examples#

base

{x \rm y} z

textmacros

\text{\rm x}

Package variants#

PackageSignatureAllowed modeNotes
basemathLegacy math-mode declaration for switching subsequent symbols in the current group to upright/roman.
textmacrostextLegacy declaration that switches following text to upright/roman styling until the current group ends.

In TeXForm#

TeXForm parses this entry as declarative syntax; the package determines its argument specification.

Equivalent forms#

  • \mathrm{#1}approximate

    Prefix command alternative for math mode

  • \textrm{...}approximate

    \textrm is a command with arguments, whereas \rm is declarative.

  • {\rmfamily ...}exact

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
{\rm a}Positive · baselinePassPassPass
textmacros
InputCaseMathJaxKaTeXXeTeX
{\rm a}Positive · baselinePassPassPass
All 80 in Fonts and styles