# Shortcut for Variable-Taking Command

I'm working with vectors, which I'm denoting with $\overrightarrow{a}$, where a is just the name of the vector, and thus is a variable that can take any value. I would like to redefine this as $\v{a}$, to save time and effort. How do I do this?

Apologies if this question is a duplicate - I did find some similar questions, but none that I thought directly answered this.

• \newcommand*{\V}[1]{$\overrightarrow{#1}$} Use it as \V{a} – user11232 Nov 8 '13 at 9:42
• Remark: if I'm already in math-mode, it's better to have the command as \newcommand*{\V}[1]{\overrightarrow{#1}} – Newb Nov 8 '13 at 9:49
• @HarishKumar how would I do that? – Newb Nov 8 '13 at 9:57
• If I end up only using it in one mode, why would the latter option be better than the first? – Newb Nov 8 '13 at 10:02

LaTeX provides the semantic macro \vec to typeset a vector. This is short, clear and easy to understand for others. As Martin pointed out in Short names for macros there are several one letter macros that do accent stuff. It is also harder to read for others, once you submit your file for editing or proof reading.
As has been pointed out in the comments, you can do \newcommand*{\V}[1]{\overrightarrow{#1}} without automatic selecting math mode if necessary. Be sure to be the one who decides when math should be involved. You can read more about this in When not to use \ensuremath for math macro?