# Horizontal Alignment When Using Overset with Superscript

I have the following problem. In the latex snippet below the superscript "(+)" is slighty higher for the complex conjugate c (c with star on top) than with the normal c. How can I align this so both are at the same height?

\documentclass[8pt,handout]{beamer}
\usepackage{amsmath}

\begin{document}

$$\label{eq:distribution_fn} f_r(\bar{p},t) ~=~ \langle ~ 0_{\text{in}} ~ | ~ \overset{*}{c}^{(+)}_{\bar{p}r}(t) ~ c^{(-)}_{\bar{p}r}(t) ~ | ~ 0_{\text{in}} ~ \rangle$$

\end{document}

• Is this right for you? \overset{*}{c}{}^{(+)}
– Ivan
Mar 25 at 20:40
• Wow, this is perfect! And an easy solution on top of that, thanks! Mar 25 at 21:12
• @Whitechapel: There is no need to use ~ around operators/symbols since the spacing around binary operators/relations will be set as needed. I know it might feel close to you, but these settings are quite common. Using it might stem from a historic use of eqnarray where additional space was inserted. Of course, your choice might be personal preference, and that's okay too...
– Werner
Mar 25 at 21:40

I suggest using accents:

\documentclass[8pt,handout]{beamer}
\usepackage{amsmath}
\usepackage{accents}

\newcommand{\cstar}{\accentset{*}{c}}

\begin{document}

$$\label{eq:distribution_fn} f_r(\bar{p},t) = \langle 0_{\mathrm{in}} \mid \cstar^{(+)}_{\bar{p}r}(t) \, c^{(-)}_{\bar{p}r}(t) \mid 0_{\mathrm{in}} \rangle$$

\end{document}


I removed all ~ commands and used \mid for spacing the vertical bars. Between the two big symbols I inserted \,. On the other hand, this doesn't seem really necessary. Here's the output without manual spacing.

• This looks good, I think I will adopt your suggestion. What exactly is the advantage of \mid over ~ ? Mar 26 at 0:49
• @Whitechapel It doesn’t require you to remember adding manually the spacing. I realize now that there is still another ~ to remove. If you feel that some space is necessary there, use \,. Mar 26 at 7:41