[Tex/LaTex] How to typeset subscript in usual text mode


It's easy to make subscripts in math mode: $a_i$.

How do I make a subscript outside math environment, likethis?

Best Answer

Note that \textsubscript enters math mode as well. This might produce problems in PDF strings where math is not allowed, for instance in bookmarks. If you used hyperref and simply used \textsubscript in a section heading, hyperref would complain about the math shift. The command \texorpdfstring comes to the rescue:

\section{\texorpdfstring{like\textsubscript{this}}{like this}}

That applies to math and math symbols in sectioning headings of course as well.

Since 2015, LaTeX provides the fixltx2e features by default, so you can omit \usepackage{fixltx2e}then.