To get an expression exp to appear as a subscript, you just type _{exp} . To get exp to appear as a superscript, you type ^{exp} . LaTeX handles superscripted superscripts and all of that stuff in the natural way. It even does the right thing when something has both a subscript and a superscript.
How do you do Underscript in LaTeX?
To get an expression, exp, to appear as a subscript, you just type _{exp}. should display as "H2O is the formula for water". Note that the braces around the argument may be omitted if the subscript is a single character.
How do you insert a superscript in LaTeX?
Hypertext Help with LaTeX
To get an expression, exp, to appear as a superscript, you just type ^{exp}.