0

Here's and example of what I have which italicizes everything:

\begin{equation} 
\lambda = c/f = (3x10^8~m/s)/2x10^8~Hz = 1.5~m
\end{equation}
Torbjørn T.
  • 206,688
Juno
  • 1
  • 9
    Hi, welcome. You could take a look at the features of the siunitx package, which is for formatting numbers with and without units, see e.g. https://tex.stackexchange.com/questions/2248/what-package-should-i-use-to-typeset-units/2254#2254 – Torbjørn T. Jul 12 '20 at 19:48
  • 1
    @TorbjørnT. Hello, thank you so much! That worked perfectly! – Juno Jul 12 '20 at 20:18

1 Answers1

2

Here's one solution:

\newcommand{\amt}[2]{\ensuremath{#1\,\mathrm{#2}}}

which is used like \amt{9.80}{m/s^2} and can be used in either text or math mode.

You can also take a look at the siunitx package.

Sebastiano
  • 54,118
Herb Schulz
  • 3,410