Knowledge base dedicated to Linux and applied mathematics.

Home > Latex > FAQ > Latex - FAQ > **Latex how to write text in math mode**

All the versions of this article: <English> <français>

It is sometimes useful to add text in Latex formulas or equations. However, it is clear that the text in question is displayed in italics. How to put text in math and what is the way of embedding text into math mode: \textrm , \text

To write text in math mode use **\textrm**:

```
$u_2 = \textrm{Second element of the sequence } u_n$
```

$$u_2 = \textrm{Second element of the sequence } u_n$$

Do not forget the space before closing !!!

Without \textrm, it is not beautiful:

```
$u_2 = Second element of the sequence u_n$
```

$$u_2 = Second element of the sequence u_n$$

Do not forget in preamble to add amsmath package:

```
\usepackage{amsmath}
```

To write text in math mode use with amsmath package **\text**:

```
$u_2 = \text{Second element of the sequence } u_n$
```

$$u_2 = \text{Second element of the sequence } u_n$$

- How to write number sets N Z D Q R C with Latex: \mathbb, amsfonts and \mathbf
- How to write angle in latex langle, rangle, wedge, angle, measuredangle, sphericalangle
- Latex numbering equations: leqno et fleqn, left,right
- How to write a vector in Latex ? \vec,\overrightarrow
- Latex how to insert a blank or empty page with or without numbering \thispagestyle,\newpage,\usepackage{afterpage}
- Latex natural numbers
- Latex real numbers
- Latex binomial coefficient
- Latex overset and underset
- Latex absolute value
- Latex piecewise function
- Latex how to hide page number
- How to write algorithm and pseudocode in Latex ?\usepackage{algorithm},\usepackage{algorithmic}
- How to display formulas inside a box or frame in Latex ? \boxed
- Latex how to write underscore
- How to write table in Latex ? begin{tabular}...end{tabular}
- Latex norm for vector and sum
- Latex infinity symbol
- Latex how to write percent
- Latex how to write a fraction
- Latex how to write bar
- Latex how to write text in math mode
- Latex rational numbers
- Latex quaternion numbers
- Latex complex numbers
- Latex indicator function
- Latex plus or minus symbol
- Latex symbol for all x
- Latex symbol exists
- Latex symbol not exists
- Latex horizontal space: qquad,hspace, thinspace,enspace
- Latex square root symbol
- Latex degree symbol
- LateX Derivatives, Limits, Sums, Products and Integrals
- Latex copyright, trademark, registered symbols
- Latex euro symbol
- Horizontal and vertical curly Latex braces: \left\{,\right\},\underbrace{} and \overbrace{}
- How to get dots in Latex \ldots,\cdots,\vdots and \ddots
- Latex symbol if and only if / equivalence
- Latex empty set
- Latex normal distribution symbol
- Latex gradient symbol
- Latex jacobian symbol
- Latex arrows
- Latex convolution symbol
- Latex backslash symbol
- Latex tensor product
- Latex real part symbol
- Latex imaginary part symbol
- Latex produit tensoriel
- How to write matrices in Latex ? matrix, pmatrix, bmatrix, vmatrix, Vmatrix
- Latex symbol belongs to
- Latex symbol not in
- Latex symbol multiply
- Latex symbol different
- Latex symbol not equal
- Latex yen symbol
- Latex symbol there exists one and only one
- Latex Planck constant h
- Latex symbol average
- Latex symbol checkmark
- Latex bra ket notation