3

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}

\begin{equation} \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{equation}
    
\end{document}
3
  • 1
    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
2

I suggest using accents:

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

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

\begin{document}

\begin{equation} \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{equation}

\end{document}

enter image description here

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.

enter image description here

2
  • 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 \,.
    – egreg
    Mar 26 at 7:41

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.