1

The following code

$X^D \overline{X}^D$ Versus $X^{^D} \overline{X}^D$ 

gives enter image description here

I would like to have alignment and same size of D.

Thanks

enter image description here

Clairon
  • 407

1 Answers1

1

I'd avoid \overline: \bar is more elegant. If you really think it's too short, you may try \widebar (see https://tex.stackexchange.com/a/391193/4427)

\documentclass{article}
\usepackage{amsmath,amssymb}

% for \widebar \DeclareFontFamily{U}{mathx}{} \DeclareFontShape{U}{mathx}{m}{n}{ <-> mathx10 }{} \DeclareSymbolFont{mathx}{U}{mathx}{m}{n} \DeclareFontSubstitution{U}{mathx}{m}{n} \DeclareMathAccent{\widebar}{\mathalpha}{mathx}{"73}

% fixed overline \newcommand{\foverline}[1]{\smash[t]{\overline{#1}}\vphantom{#1}}

\begin{document}

Bar: $X^D+\bar{X}^D$

Widebar: $X^D+\widebar{X}^D$

Overline: $X^D+\foverline{X}^D$

\end{document}

enter image description here

egreg
  • 1,121,712