TransWikia.com

Horizontal Alignment When Using Overset with Superscript

TeX - LaTeX Asked by Whitechapel on May 9, 2021

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}

One Answer

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

Answered by egreg on May 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP