1

Here is an example of superscripts staggering after subscripts with the amsmath package:
{x_\text{P}}^2.
But in this case they do not stagger:
{\bar{x}_\text{P}}^2

How can I get staggering similar to my first example?

  • 2
    Don't use \text to begin with, but \mathrm. The correct way is {{}\bar{x}_{\mathrm{P}}}^2 (assuming you really want the superscript to hang from nowhere. – egreg Nov 22 '17 at 23:46
  • 2
    This is essentially the same as tex.stackexchange.com/questions/125165 but with superscript instead of subscript. – egreg Nov 22 '17 at 23:49
3

This is almost the same as Can I have a dot and a double subscript at a single letter?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

${x^{}_{\mathrm{P}}}^2$ ${{}\bar{x}^{}_{\mathrm{P}}}^2$

\textit{Spot the difference $x_{\text{P}}\ne x_{\mathrm{P}}$}

\end{document}

One needs an empty atom in order the stripping of outer braces around a single Acc atom is not performed.

I find the staggered superscript to be hanging from nowhere and I'd avoid it.

By the way, you should use also an empty superscript in order to move the subscript down. And \mathrm{P} instead of \text{P}. Notice also the extra braces.

enter image description here

| improve this answer | |
  • not able to test, but seem to remember that "tensor" strings of subs and sups could be offset as a_b{}^c{}_d{}e. should be an example in the texbook. – barbara beeton Nov 23 '17 at 0:47
  • @barbarabeeton: Yes, it’s Exercise 16.6 on p. 130; another example is on p. 169. Look up “tensor notation” in the index. – GuM Nov 23 '17 at 0:53
  • What is the advantage of the extra braces around \mathrm{P}? – Davis Rash Nov 23 '17 at 1:01
  • @DavisRash The difference is between correct syntax versus a construct that works by chance. – egreg Nov 23 '17 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.