[Tex/LaTex] Overlined capital letter with small parenthesis

oversetsymbols

I would like to produce a particular symbol represented by a capital letter with an uppercase index and an overline bar between small parenthesis. By looking on the web I found

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb}
\usepackage{mathtools}

\begin{document}
\newcommand\brabar{\scalebox{.3}{(}\raisebox{-1.7pt}{$-$}\scalebox{.3}{)}}
\[
\overset{\brabar}{D}\phantom{}^{0}
\]
\end{document}

which produce something close to what I am looking for (not in a very elegant way). I would simply like to have the (-) overset symbol closer to the D capital letter. Is it possible to do that? Thank you very much in advance.

Best Answer

You can use the stackengine package. Ignore all the commands in the example, I only used those to typeset a compact example.

The commands that are important for you are

% PREAMBLE
\newcommand\brabar{\scalebox{.3}{(}\raisebox{-1.7pt}{--}\scalebox{.3}{)}} 

% DOCUMENT
\stackon[.1pt]{<letter>}{\brabar}

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{stackengine}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{pgffor}

\newcommand\brabar{\scalebox{.3}{(}\raisebox{-1.7pt}{--}\scalebox{.3}{)}}

\begin{document}
\newgeometry{textwidth=3.5cm}
\foreach \lett in {A,B,C,...,Z}{
\noindent\stackon[.1pt]{\lett}{\brabar}
}
\restoregeometry
\end{document}