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.

 

License

Icon for the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

Using Latex in Pressbooks Copyright © 2021 by Sanja Krajisnik and Jelena Loncar is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, except where otherwise noted.

Share This Book