# about overline command

I used to fix the \overline command to get a conjugate complex number for I think the line does not so satisfy me by its length. You may noticed something like:

$$\overline{N}+\overline{F}+\overline{C}$$


could turn fine by:

$$\mkern3mu\overline{\mkern-3muN} +\mkern3mu\overline{\mkern-3muF} +\mkern2mu\overline{\mkern-2muC}$$


The \bar command don't have any profit in this situation.

How can I creat a command without cocerning the specific letter to get appropriate line width?

-

You can try the following. It measures the difference in width between the upright (\mathrm) and the normal math character. The overline is set over a phantom box of the size of the upright symbol. It is then moved to the right with the difference in width between the two characters. It will work for super and subscripted symbols also

\documentclass{article}
\makeatletter
\newsavebox\tboxa
\newsavebox\tboxb
\newlength\tdima

\newcommand*{\oversymb}{\mathpalette\@oversymb}

\newcommand*{\@oversymb}[2]{%
\sbox{\tboxa}{$\m@th#1\mathrm{#2}$}%
\setbox\tboxb\null%
\ht\tboxb\ht\tboxa%
\dp\tboxb\dp\tboxa%
\wd\tboxb\wd\tboxa%
\sbox{\tboxa}{$\m@th#1{#2}$}%
\setlength\tdima{\the\wd\tboxa}%
\sbox{\tboxb}{$\m@th#1\hskip\tdima\overline{\xusebox{\tboxb}}$}%
\rlap{\usebox\tboxb}{\usebox\tboxa}}

\newcommand*{\xusebox}[1]{\mathord{{\usebox{#1}}}}

\makeatother
\begin{document}
$\oversymb{N} + \oversymb{F} + \oversymb{C}$
$\oversymb{A} + \oversymb{a} + \oversymb{B} + \oversymb{b} + \oversymb{i}$
$x_{\oversymb{X}}$
\end{document}


The result is

-