# Vector accent with emphasized origin

A vector accent can be applied to a letter, or a string of letters, via the \vec command, which is built into MathJax, as follows: \vec{x} yields $$\vec{x}$$, and \vec{xy} yields $$\vec{xy}$$.

I'm interested in a similar accent with the difference that the vector's origin (namely, the left edge of the arrow) is emphasized with a full circle, something similar to , and , respectively.

How can such an accent be achieved?

• This really seems like more of a TeX - LaTeX question than a Math SE question...
– Xander Henderson Mod
Sep 11 at 12:00
• @XanderHenderson OK. I posted a question in the TeX stackexchange. However, I'll be interested in using this accent in an answer I'm writing for math.stackexchange. And \vec acts a little differently in math.stackexchange than in TeX: the TeX version doesn't stretch automatically. Sep 11 at 14:51
• Honestly, I would recommend against using MathJax to insert this sort of symbol. One of the good things about MathJax is that it retains semantic meaning, thus folk using screenreaders can still understand what is being said (e.g. \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.
– Xander Henderson Mod
Sep 11 at 15:26
• I would further argue that you probably shouldn't use the symbol you are proposing. The symbol you propose looks almost exactly the same as that produced by \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?
– Xander Henderson Mod
Sep 11 at 15:31
• @XanderHenderson: The use of this symbol is required in order to retain syntactic meaning in an appropriate way. It is intended to be used in conjunction with \vec, not in its stead. Sep 11 at 15:51
• @Xander Extremely minor quibble... The command \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. Sep 14 at 18:51
• @ElliotYu Oi. Of course. I blame the dyslexia. Thanks.
– Xander Henderson Mod
Sep 14 at 18:55
• BTW MathJax allows you to define new macros using \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. Sep 14 at 19:03


The following answer doesn't exactly meet the specifications, but it'll do for my purposes. It is much simpler to implement than the solution described here.

With the commands


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 \bullets. 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.