text in latex equation code example

Example 1: latex normal text in equation

\usepackage{amsmath}
$...\text{normal text}...$

Example 2: string in equation latex

\documentclass{article}

\usepackage{amsmath}
\begin{document}


abcdef
$\text{abcdef} + \textrm{abcdef} + \textnormal{abcdef} + \mathrm{abcdef}$

{\sffamily
abcdef
$\text{abcdef} + \textrm{abcdef} + \textnormal{abcdef} + \mathrm{abcdef}$
}

\end{document}

Example 3: normal text in equation latex

\usepackage{amsmath}
$123 \text{stuff to type} 123$

% Without amsmath package:
$123 \textrm{stuff to type} 123$

Tags:

Misc Example