Subscript in LaTeX text mode
It’s an easy task to write subscripts in LaTeX math mode with this _. But This technique did not work in text mode. So in this tutorial, I will show you various methods to write subscript in LaTeX text mode.
| Package | Command | Output |
|---|---|---|
| None | U$_{\text{a}}$ | Uₐ |
| None | U\textsubscript{a} | Uₐ |
mhchem | \ce{U_{a}} | Uₐ |
Let’s see some examples for a better understanding.
\documentclass{article}
\usepackage{mhchem}
\begin{document}
\verb|$like_{this}$| $\rightarrow$ $like_{this}$
\\[4pt]
\verb|like$_{\text{this}}$| $\rightarrow$ like$_{\text{this}}$
\\[4pt]
\verb|like\textsubscript{this}| $\rightarrow$ like\textsubscript{this}
\\[4pt]
\verb|\ce{like_{this}}| $\rightarrow$ \ce{like_{this}}
\\[4pt]
\verb|\ce{like_{this\ and\ this}}| $\rightarrow$ \ce{like_{this\ and\ this}}
\end{document}Output:

Leave a Reply