12 Text in Math Mode
Sometimes you will need to insert some text within an equation. Text in math mode can be inserted using:
- \text mode – used for font formatting
- \mbox mode – used for standard text
Example: Using the \mbox mode
[latex]50 \;\mbox{apples} \times 100 \;\mbox{apples} = \mbox{lots of apples}[/latex]
[latex] 50 \;\mbox{apples} \times 100 \;\mbox{apples} = \mbox{lots of apples} [/latex]
Example: Using the \text mode for formatting
[latex]50 \;\text{apples} \times 100 \;\textbf{apples} = \textit{lots of apples}[/latex]
[latex] 50 \;\text{apples} \times 100 \;\textbf{apples} = \textit{lots of apples} [/latex]
Note: Here we used the \textbf command to bold “apples” and \textit command to write “lots of apples” in italics.