3

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

Maverick
  • 303
  • Here is another possibility: [Lowering the height of a superscript?](https://tex.stackexchange.com/q/574666] – barbara beeton Jun 16 '21 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. – David Carlisle Jun 16 '21 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. – hpekristiansen Jun 16 '21 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 '21 at 21:01

1 Answers1

11

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

enter image description here

\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>}.

Werner
  • 603,163