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.
Edit: Question has been extensively answered in the comments. Thanks!
\newcommand*{\V}[1]{$\overrightarrow{#1}$}Use it as\V{a}– Nov 08 '13 at 09:42\newcommand*{\V}[1]{\overrightarrow{#1}}– Newb Nov 08 '13 at 09:49\newcommand*{\V}[1]{\ensuremath\overrightarrow{#1}}. But use it only if you intend to apply in both modes. Otherwise, as you said\newcommand*{\V}[1]{\overrightarrow{#1}}is better. – Nov 08 '13 at 10:00\ensuremathin the site. Now I am on mobile, so searching is difficult. – Nov 08 '13 at 10:05\newcommand{\V}[1]{\overrightarrow{#1}}and be happy. I used\ensuremathyesterday in an answer; I believe it's the first usage I made of it in a couple of months. – egreg Nov 08 '13 at 10:05