# How to lower the superscript in a math mode manually

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.

• Here is another possibility: [Lowering the height of a superscript?](tex.stackexchange.com/q/574666] – barbara beeton Jun 16 at 20:47
• 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. – David Carlisle Jun 16 at 20:48
• You always need to include a compilable MWE for others to test. The code that produces your picture will do nicely. – hpekristiansen 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:

\documentclass{article}

\begin{document}

$\dot{\overline{P}}^A$
$\overline{P}^A$
$\dot{\overline{P}}{\vphantom{\overline{P}}}^A$

\end{document}


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
• 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