# Range symbol over character

How can I put a range symbol over a character?

The symbol I am looking for is similar to this:

\overleftrightarrow{T}


But instead of using an arrow at each end, I want to put a black dot at each end.

Here's an extensible version.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\range}{\mathpalette{\overarrow@\range@}}
\newcommand{\range@}{%
\arrowfill@\leftrangebullet\relbar\rightrangebullet
}
\newcommand{\leftrangebullet}{\mathrel{\smallbullet}\joinrel\relbar}
\newcommand{\rightrangebullet}{\relbar\joinrel\mathrel{\smallbullet}}
\newcommand{\smallbullet}{%
\vcenter{\hbox{$\m@th\scriptscriptstyle\bullet$}}%
}
\makeatother

\begin{document}

$\range{T}+\range{ABCD}$

\end{document}


Now also \leftrange and \rightrange:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\range}{\mathpalette{\overarrow@\range@}}
\newcommand{\leftrange}{\mathpalette{\overarrow@\leftrange@}}
\newcommand{\rightrange}{\mathpalette{\overarrow@\rightrange@}}
\newcommand{\range@}{%
\arrowfill@\leftrangebullet\relbar\rightrangebullet
}
\newcommand{\leftrange@}{%
\arrowfill@\leftrangebullet\relbar\relbar
}
\newcommand{\rightrange@}{%
\arrowfill@\relbar\relbar\rightrangebullet
}
\newcommand{\leftrangebullet}{\mathrel{\smallbullet}\joinrel\relbar}
\newcommand{\rightrangebullet}{\relbar\joinrel\mathrel{\smallbullet}}
\newcommand{\smallbullet}{%
\vcenter{\hbox{$\m@th\scriptscriptstyle\bullet$}}%
}
\makeatother

\begin{document}

$\range{T}+\range{ABCD}$

$\leftrange{T}+\leftrange{ABCD}$

$\rightrange{T}+\rightrange{ABCD}$

\end{document}


• Oh thanks, in fact, I was having problems with extensions – AAA Dec 3 '17 at 16:33
• Just a quick question, How can I do a half range?. For example for start range: just the left circle and the bar – AAA Dec 3 '17 at 16:56
• @DiegoDiazDominguez Easy enough! ;-) – egreg Dec 3 '17 at 17:04
• interesting. the length of the bar isn't the same for a single-ended vs. double-ended extender. and it's not just the width of the ball on the end. – barbara beeton Dec 4 '17 at 17:21
• @barbarabeeton There is a minimum width, because there is \relbar on both sides. This shows for the single symbol. – egreg Dec 4 '17 at 18:15
\documentclass{article}
\usepackage{amsmath}
\usepackage{fdsymbol}
\begin{document}
$\overset{\leftrightblackspoon}{T}$ or
$\overset{\leftrightblackspoon}{\text{T}}$
\end{document}


• @DiegoDiazDominguez Glad to hear. Please consider clicking the checkmark symbol left of the answer in order to indicate that this question is answered. – user121799 Dec 3 '17 at 15:57
• @marmot Note that fdsymbol changes all math symbols. – egreg Dec 3 '17 at 16:01
• @egreg Thanks for pointing this out. I am wondering if there is a survey of these issues. To my knowledge, the calatlogue of symbols does not explain this, or was I looking at the wrong place? – user121799 Dec 3 '17 at 16:21
• You should look at the package documentation first: FdSymbol is a font of mathematical symbols designed as a companion to Typotheque’s Fedra family, but it might also fit well to other contemporary typefaces. Note “might”. – egreg Dec 3 '17 at 16:25

How does that look?

\documentclass[]{standalone}

\usepackage{amsmath}

\begin{document}
$\overset{\cdot - \cdot}{T}$
\end{document}