TeXipedia

textrm

Switches text to the default Roman (upright) font style within mathematical or other specialized environments.

Overview

Essential for maintaining proper typographical conventions when including regular text within mathematical expressions or other specialized contexts.

  • Commonly used for units, mathematical constants, and standard function names.
  • Ensures text appears in the document's default Roman font rather than math italics.
  • Particularly valuable in mathematical papers and technical documents where distinguishing between variables and text is crucial.
  • Preserves proper spacing and kerning for regular text while respecting the surrounding mathematical context.

Examples

Using normal (roman) text within a mathematical formula

f(x)=sin(x)+log(x)f(x) = \textrm{sin}(x) + \textrm{log}(x)
f(x) = \textrm{sin}(x) + \textrm{log}(x)

Labeling mathematical expressions with roman text

E=mc2(Einstein’s equation)E = mc^2 \quad \textrm{(Einstein's equation)}
E = mc^2 \quad \textrm{(Einstein's equation)}

Adding units in roman font to mathematical quantities

Δt=3.2 seconds\Delta t = 3.2 \textrm{ seconds}
\Delta t = 3.2 \textrm{ seconds}