texblog

Displaying text inside the math-environment

By default, Latex will print text within formulas in italics, omitting white spaces. Now if you need to add normal text into a formula or even write a formula using words, you can do this with the text-command inside the math-environment:

\usepackage{amsmath}

\text{...}

Example:

\text{velocity} = \frac{\text{distance}} {\text{unit of time}}

Btw. The “text-command” will also take care of the spaces, which would otherwise be ignored.

Note:
Spaces in the math-environment can be produced using:

Intertext

Using the math-environment align to display a series of equations, whole lines of text can be added in between using the “intertext”-command without affecting the alignment of the equations:

\begin{align}
...
\intertext{...}
...
\end{align}

Example:

\begin{align}
F = f_1+f_2+f_3+...+f_n
\intertext{can be written as}
\sum_1^n{f_i}
\end{align}
Exit mobile version