I am using amsmath package, and I would like to print $\dot{\overline{P}}^{A}$ such that the letter A was at the same height as in $\overline{P}^{A}$.

The order of upper symbols matters (\dot must be over \overline). Moving A inside \dot{} is also impossible since the dot moves horribly to the right. So how can the superscript be lowered down manually? Similar problem was asked here, however, the solution doesn't work for me.

symbol A at different heights

  • Here is another possibility: [Lowering the height of a superscript?](tex.stackexchange.com/q/574666] Jun 16 at 20:47
  • 3
    what does not work mean? they should work you haven't provided a test document but I would have suggested \dot{\overline{P}}{}^{A} which is one of the answers that you link to. Jun 16 at 20:48
  • 1
    You always need to include a compilable MWE for others to test. The code that produces your picture will do nicely. Jun 16 at 20:49
  • @David Carlisle, this works well. And you're right, this was in the answer, but I missed the empty {} hint in the code. With amsmath included I got other results than presented in the answer, and this must have confused me. Silly, I know :(
    – Maverick
    Jun 16 at 21:01

Capture the height of \overline{P} via {\vphantom{\overline{P}}} and use that to add a superscript:

enter image description here





The above solution uses content from \vphantom and superscripts - specifically, {<vphantom>}^{<exp>}.

  • Neat! Works like a charm :) Thank you.
    – Maverick
    Jun 16 at 20:49
  • Very nice solution. Good to know.
    – SebGlav
    Jun 16 at 21:26
  • 3
    Or use \vphantom then no need to measure, \dot{\overline{P}}\vphantom{\overline{P}}^A
    – daleif
    Jun 17 at 5:20
  • @daleif: This doesn't work as expected, since the height of the exponent is much lower.
    – Werner
    Jun 17 at 16:01
  • @Werner that sounds odd, it should give exactly the same size as your settoheight
    – daleif
    Jun 17 at 16:09

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.