I want to write a superscript and a subscript at the same place.Every time I do it, it is a superscript then a space followed by the subscript. How do I stack it vertically?
1 Answer
I presume you are in math mode and I assume you want to have both superscript and subscript horizontally aligned next to the symbol you are super-/subscripting. You can achieve this like this: $A_b^c$
. Note that the order is irrelevant, $A^c_b$
looks identical. You can group symbols using curly brackets like so: ${A_b}^c$
or $A_{b^c}$
.
-
1The last one has a typo. It should be
$A_{B^C}$ produces...
(the_
is outside the{...}
. Commented Jun 11, 2019 at 16:39 -
A\textsubscript{B}\textsuperscript{C}
? If so, you shouldn't. You should employ math instead of text mode and write$A_B^C$
. Here,$
serves to enter and exit inline math mode.