I don't think you should do this usually. But here are some possibilities.
$\stackrel{\bullet\!\to}{x}$ $\stackrel{\bullet\!\to}{X}$ $\stackrel{\bullet\!\to}{xy}$
$\overrightarrow{\smash{\stackrel{\bullet}{x}}y}$ $\overrightarrow{\smash{\stackrel{\bullet}{x}}y\smash{b}}$ $\overrightarrow{\smash{\stackrel{\bullet}{x}}y\smash{bAc}}$
$\overrightarrow{\smash{\stackrel{\bullet}{A}}B}$ $\overrightarrow{\smash{\stackrel{\bullet}{A}}C}$ $\overrightarrow{\smash{\stackrel{\bullet}{C}}F}$
$\overrightarrow{\smash{\stackrel{\bullet}{A}}BCDG}$
$\overrightarrow{\smash{\stackrel{\bullet}{\mathcal X}}\mathcal YZ}$
$\overrightarrow{\smash{\stackrel{\bullet}{\mathbb X}}\smash{\mathscr Y}Z}$
$\overrightarrow{CDEF\smash{\stackrel{\bullet}{A}}B_1\smash{\stackrel{\bullet}{A}}B_2\smash{\stackrel{\bullet}{A}}B_3CDEF}$
There are mainly two constructs; firstly, $\stackrel{\bullet\!\to}x$
makes $\stackrel{\bullet\!\to}x$ which barely works for two symbols $\stackrel{\bullet\!\to}{xy}$
$\smash{\stackrel{\bullet\!\to}{xy}}$.
Secondly, using \smash
, you can also overlay the \bullet
on top of a \overrightarrow
: $\overrightarrow{\smash{\stackrel{\bullet}{x}}y}$
$\overrightarrow{\smash{\stackrel{\bullet}{x}}y}$ The arrow pokes out the left of the \bullet
, and the height isn't so consistent. But it works for longer strings of letters, and you can put many different \bullet
s. You may need to experiment with \smash
e.g. $\overrightarrow{\smash{\stackrel{\bullet}{x}}y\smash{bAc}}$
$\overrightarrow{\smash{\stackrel{\bullet}{x}}y\smash{bAc}}$.
And of course there is $\stackrel{\leftarrow\!\bullet}{xy} $ etc.
\vec
acts a little differently in math.stackexchange than in TeX: the TeX version doesn't stretch automatically. $\endgroup$\vec
means "vector"). In a real LaTeX document, that semantic meaning can be retained by defining macros in an appropriate way. But MathJax is going to lose some of that semantic meaning if you start prioritizing the "look" of a symbol over the meaning. $\endgroup$\vec
. If you were to use both symbols in a document, I would imagine that it would be nearly impossible for most people to distinguish them. But if only one is needed, why not just use the symbol which already exists? $\endgroup$\vec
, not in its stead. $\endgroup$\vec
meaning "vector" should be an example of LaTeX being designed with "semantics" not "syntax" in mind. See also these posts for this usage, as well as some discussions concerning how much semantics matter in TeX. $\endgroup$\newcommand
and so on. MathJax will render it if it's defined before you use it, even if the definition and usage are not within one single math environment. This means that you can still make a macro like\altvec
to convey the meaning. $\endgroup$